anderground Posted May 10, 2011 Share Posted May 10, 2011 Hi Here is the thread i started on apachefriends, but i hope i could get the answer here sooner. I can start mysql (mysqld) through the xampp control panel, but i also wanted (for testing purpose) to be able to start it through the cmd. But something's wrong.. if i try either C:\xampp\mysql\bin>mysqld or C:\xampp\mysql\bin>mysqld --user=mysql also --user=root i get the following error: 110510 2:22:03 [Warning] Can't create test file \usr\local\mysql\data\compname.lower-test 110510 2:22:03 [Warning] Can't create test file \usr\local\mysql\data\compname.lo wer-test mysqld: Can't change dir to '\usr\local\\mysql\data\' (Errcode: 2) 110510 2:22:03 [ERROR] Aborting 110510 2:22:03 [Note] mysqld: Shutdown complete (i put the folders C:\xampp\tmp, C:\xampp\mysql and C:\windows/temp in the anti-vir exceptions list.) So how can i start mysqld manually ? xampp 2.5.8 win xp pro Thanks Link to comment Share on other sites More sharing options...
0 farmeunit Posted May 10, 2011 Share Posted May 10, 2011 http://www.apachefriends.org/en/xampp-windows.html#1173 Link to comment Share on other sites More sharing options...
0 anderground Posted May 10, 2011 Author Share Posted May 10, 2011 http://www.apachefriends.org/en/xampp-windows.html#1173 Thanks for the reply, but this is about an xampp batchfile that starts mysqld (using xampp_cli.exe).. But i want to be able to start mysqld (mysql process) manually through the cmd shell without any xampp support. Link to comment Share on other sites More sharing options...
0 chevyordeath Posted May 10, 2011 Share Posted May 10, 2011 Looks like a permissions error. I have no experience with mysql on windows - but on Linux it needs a password argument as well as the user mysql -u username -p Space after the user argument, no space after the password argument. You either put the password in directly after the -p with no spacing -pPassword or you leave it blank and it asks for one. That would be for Linux, I would assume it would be similar with Windows. offroadaaron 1 Share Link to comment Share on other sites More sharing options...
0 articuno1au Posted May 10, 2011 Share Posted May 10, 2011 net start [service name] It's what we use to restart the IIS service on the fly.. http://ss64.com/nt/net_service.html Link to comment Share on other sites More sharing options...
0 anderground Posted May 10, 2011 Author Share Posted May 10, 2011 Thanks +chevy but it's not actually that. This code is for connecting to mysql server if mysqld deamon is already started (by xampp control panel), and in that case i'm able to connect using that command without problems: mysql -u root (password is not needed as i didn't set password in mysql.ini) The problem is how to get mysqld to work without xampp, but using only cmd shell. I used to do it once, (when i had mysql installed without any xampp alike tools) but i forgot how.. net start [service name] It's what we use to restart the IIS service on the fly.. http://ss64.com/nt/net_service.html Thanks I haven't mysql service installed.. I want to start mysqld deamon manually. Link to comment Share on other sites More sharing options...
0 articuno1au Posted May 10, 2011 Share Posted May 10, 2011 The easiest way I can think of doing it is to install the service, set the service default state to stopped, then use the net start command. I don't really think there is a downside to this approach, and it gives you the pause and stop commands via Windows Service manager which will ensure orderly shutdown of the process if in use. If this isn't a good approach, then I'm of 0 help from here on in :p Good luck :) Link to comment Share on other sites More sharing options...
0 anderground Posted May 10, 2011 Author Share Posted May 10, 2011 Well it actually sounds as a good idea. Thanks (Y) But it just bothers me why i can't get an exe file (mysqld.exe inside mysql/bin folder) to work.. i mean if xampp batch file can do it without permission problems, why i'm not able to do the same ?? I'm that kind of person, i can't accept that easy that things dont work :argh: Link to comment Share on other sites More sharing options...
0 farmeunit Posted May 10, 2011 Share Posted May 10, 2011 It's been awhile since I've messed with it, but isn't there another way to configure it so the path variables stay the same? Maybe the XAMPP CLI manages that for you, so when you try running it outside of XAMPP, you get errors, because it is trying to use the standard path. Just a thought. Link to comment Share on other sites More sharing options...
0 anderground Posted May 10, 2011 Author Share Posted May 10, 2011 Hmm path variable.. maybe you're right.. :o I remember i had to set a path variable (when i had mysql without xampp). Do you have an idea how it should look (i'll try to google it) ? edit: i added the path of the bin folder C:\xampp\mysql\bin in the system variables, but to no avail.. maybe a restart is needed. Link to comment Share on other sites More sharing options...
0 farmeunit Posted May 10, 2011 Share Posted May 10, 2011 Hmm path variable.. maybe you're right.. :o I remember i had to set a path variable (when i had mysql without xampp). Do you have an idea how it should look (i'll try to google it) ? http://www.apachefriends.org/en/xampp-windows.html#521 That and the paragraph below it. I'm not so sure if that will fix your problem or not when I look at it again. Like I said, it's been forever. Link to comment Share on other sites More sharing options...
0 anderground Posted May 10, 2011 Author Share Posted May 10, 2011 no result :no: Link to comment Share on other sites More sharing options...
Question
anderground
Hi
Here is the thread i started on apachefriends, but i hope i could get the answer here sooner.
I can start mysql (mysqld) through the xampp control panel, but i also wanted (for testing purpose) to be able to start it through the cmd.
But something's wrong..
if i try either
or
also --user=root
i get the following error:
(i put the folders C:\xampp\tmp, C:\xampp\mysql and C:\windows/temp in the anti-vir exceptions list.)
So how can i start mysqld manually ?
xampp 2.5.8
win xp pro
Thanks
Link to comment
Share on other sites
11 answers to this question
Recommended Posts