CentOS下MySQL安裝配置筆記

來源:互聯網
上載者:User

1.安裝MySQL資料庫

$ yum install mysql-server.i686

參見:http://dev.mysql.com/doc/refman/5.1/zh/installing.html#unix-post-installation 2.9.2  Unix下安裝後的過程

2.啟動MySQL server

mysqld_safe --user=mysql --skip-grant-tables &

3.安裝系統資料表

mysql_install_db --user=mysql

4.設定root 密碼

<< mysql -u root

mysql> use mysql;

mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';

mysql> flush privileges;

mysql> quit

5.啟動mysql

service mysqld start

6.停止mysql

service mysqld stop

註:忘記root密碼之後,可執行步驟1,3 來重設root密碼。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.