Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

MySQL Ubuntu Setup (See related posts)

For some reason I needed to do this to get mysql running properly.

This worked for me:

First get debian-sys-maint user pass from /etc/mysql/debian.cnf
Example:
debian-sys-maint
YTERYgkjhbsfk87ce

Then:

$mysql -u debian-sys-maint -p
password: (put YTERYgkjhbsfk87ce here)
mysql> UPDATE mysql.user SET Password=PASSWORD('my_new_password') WHERE User='root';
mysql> flush privileges;
mysql> quit

$mysqladmin -u root password my_new_password (I didn't use this one since I don't like remote root access)
$mysqladmin -p -u root -h localhost password my_new_password

-- CONNECTION SETTINGS --
open /etc/mysql/my.cnf file
    sudo vi /etc/mysql/my.cnf

Make sure bind-address set to your server IP address (not to 127.0.0.1)
    bind-address = 192.158.5.1

Also make sure line skip-networking is removed or commented out
    # skip-networking

Save and close the file; Restart mysql
    sudo /etc/init.d/mysql restart


You need to create an account or log in to post comments to this site.


Related Posts