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
MySQL Setup in Debian
最新推荐文章于 2024-08-23 09:39:07 发布