I am at lubuntu 13.04 and i Can’t use mysqld commands i.e when i use # /etc/init.d/mysql stop

This is shown on terminal:

“Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql stop

Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the stop(8) utility, e.g. stop mysql”

when I use # mysqld_safe –skip-grant-tables & this is shown: ” 140122 23:07:14 mysqld_safe Can’t log to error log and syslog at the same time. Remove all –log-error configuration options for –syslog to take effect. 140122 23:07:14 mysqld_safe Logging to ‘/var/log/mysql/error.log’. 140122 23:07:14 mysqld_safe A mysqld process already exists ” (I think this post are a bit old)

Um… I’ve been trying to actually change the password for about 3 days now, and I tried this tutorial… No errors, but when I start the MySQL client and type in my password it just beeps and goes away :( Is there any other way?

I’ve done everything exactly as it says , but still canot connect with my mysql server. I allways have this error: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES) Even when i do NOT use a password , it just not working! i tryed to reintall mysql through synaptic , but still the same shit… No difference. Can enyone give an advise?

The problem I mentioned above, well, I tested it,and it works….thank you for the perfect guide ;-) This is the i-can’t-remember-number-of-times that one of your articles has helped me… so, thanks for that too!

Thank you very much. Windows users, you can do all of those commands from the command prompt, make sure you run it in admin mode, and change directory to where the mysql files are located, so when you run those commands it works. :)

hi , at first i want to thank you for your post its very useful for me actually i do all of above but when i want to access mysql with root (#mysql -u root -p) it said that ” ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES) ”

Awesome, I have been playing using MySQL on and off for almost 2years to understand it from a higher level and still getting use to it! This is the best straight forward instructions I’ve seen….and trust me I’ve looked at heaps :)

How do i log in as root user if I do not know the password? Also, when I use the # /etc/init.d/mysql stop, it tells me that ‘#’ is not recognized as an internal or external command. I am not very knowledgeable about these things. I am on a windows system and I don’t know the root password. Please help. Thanks.

Hi guys. This help looks soo helpfull but i dont know how to use it. i really need to reset my password. but i dont know how to Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option. I went to mysql\bin\mysqld but i cant type or do anything! can someone help me how to do those steps?

This was absolutely what they say, hitting the nail on the head. I was getting the error message and was hitting my hed on the wall when this gentleman came along and it worked like smooth butter. Thanx man , you rock

actually i used wrong command…. update mysql.user set password=”root” where user=”root” instead of update mysql.user set password=password(“root”) where user=”root” plz temme how to recover my password…thnx in advance

To the ones still suffering from this persistent — and annoying — issue, the best solution I’ve come across so far is to remove & re-install mysql (using yum, apt-get, dpkg, or whatever you like the most).

Now, the tricky step that most of the online tutorials forget to mention is that after removing mysql and — of course — BEFORE reinstalling it, you MUST remove the original db’s directory, usually under /var/lib/mysql/

on a mac the path is /usr/local/mysql/support-files/mysql.server start

so i used this /usr/local/mysql/support-files/mysql.server start –skip-grant-tables ( got this from here)

and followed your instructions

any idea why mysqld doesn’t work to start or stop server

i get this bash-3.2# mysqld stop 110321 13:33:12 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.5.10-osx10.6-x86_64/data/ is case insensitive 110321 13:33:12 [ERROR] Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root!

Same here — no root user, 0 rows affected on the update… couldn’t figure it out. your insert worked fine for me, then ran the update to set the password, then flushed privs, then restarted mysql…. done and working now… thanks!

I think there is a mis-communication in your tiourtal…I copied and pasted these two lines:./bin/mysqladmin -u root password ‘**PASSWORD**’./bin/mysqladmin -u root -h **IP_ADDRESS** password ‘**PASSWORD**’and I got this error:Unknown MySQL server host ‘**IP_ADDRESS**’ (1)’Check that mysqld is running on **IP_ADDRESS** and that the port is 3306.You can check this by doing ‘telnet **IP_ADDRESS** 3306′What should I do?

When I tried this for the first time, I got the following error saying, ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) Then resolved that issue following the steps in http://ubuntuforums.org/showthread.php?t=804021 Again for the second time, re-tried the steps in this blog. And it PERFECTLY WORKED.

Worked very well. Thanks!! I did it on both development and live server hosting critical University databases today running Suse Linux. Saved me a lot after many days. There were one or things I had to add *:

(1) Stop the server: /etc/init.d/mysql stop (be sure to do it at off peak hours!) (2) Start the mysql daemon: # mysqld_safe –skip-grant-tables & (3)* While its running, open another terminal and login to mysql # mysql -u root (hit enter) (4) Now you are logged in. mysql>use mysql; mysql>update user set password=PASSWORD(“YOUR_NEW_PASS”) where User=’root'; you should see the output: Query ok etc. mysql>flush privileges; mysql>quit (5) stop the server: /etc/init.d/mysql stop (6) *Confirm that no mysql processes are still running (in my case they were and made the server fail to start). To check this: run this ps ax | grep mysql Now kill the process IDs of any mysql still running in the background using kill PID e.g. kill 4425. Do not use kill -9 as this may crash the database entirely!! Confirm no mysql process is still running: ps ax | grep mysql (7) Then start the server: /etc/init.d/mysql start (8) login with your new password: mysql -u root -p

I used to be suggested this web site by means of my cousin. I am no longer sure whether this post is written by him as no one else understand such specific about my problem. You are amazing! Thank you!