Breaking News
Loading...
Selasa, 19 Agustus 2008

Mereset Password database mysql di fedora dan ubuntu

sebelum masuk langkah pertama anda harus login sebagai root jika anda bukan root sulit untuk merubahnya
1.Reset password mysql di ubuntu
sudo /etc/init.d/mysql stop
sudo mysqld --skip-grant-tables &
mysql -u root mysql
UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;

a. sharing mysql di ubuntu
ubah dari localhost nano /etc/mysql/my.cnf
rubah langsung ip 127.0.0.1 isi dengan ip local yg mau dijadikan database
Look for the line that starts with bind-address and change the 127.0.0.1 address to the
address you assigned to the NIC. Exit the editor saving the file. Then restart MySQL with the
command:
restart mysqlserver
/etc/init.d/mysql restart

b. cek data user di databse mysql buka host
mysql> use mysql;
mysql> desc user;
mysql> SELECT user, host, password FROM user ;

2.Reset mysql password di fedora

service mysqld stop
mysqld_safe --skip-grant-tables

You should see mysqld start up successfully. If not, well you have bigger issues. Now you
should be able to connect to mysql without a password.
mysql --user=root mysql
update user set Password=PASSWORD('new-password');flush privileges;exit; restart
mysql=> service mysqld restart / service mysql restart

untuk lebih mudahnya lagi gunakan dari windows putty dan winscp port ssh

0 comments: