MySQL Setup in Debian

http://codesnippets.joyent.com/posts/show/2038

platform : LW3xx running Debian

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章