MYSQL 啟動問題

來源:互聯網
上載者:User

標籤:query   exe   問題   mysql登入   HERE   warning   stat   解決   table   

1、日誌中出現  [ERROR] InnoDB: The Auto-extending innodb_system data file ‘./ibdata1‘ is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages! 有類似錯誤
   解決方案:在/etc/my.cnf 中修改或增加 innodb_data_file_path=ibdata1:10M:autoextend  計算方式:640頁*16K/頁 / 1024K/M = 10M
   
2、mysql.user table is damaged. Please run mysql_upgrade.
   解決方案:刪除data 目錄下的所有東西,使用 mysqld --initialize --user=mysql 命令初始化系統,保證系統能正常啟動。
   
3、mysql登入及密碼修改
   出現 error: ‘Access denied for user ‘root‘@‘localhost‘ (using password: YES)‘ 提示不能正常登入
   解決方案:
   安全啟動mysql


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


mysql


mysql> update user set authentication_string=PASSWORD(‘root‘) where user=‘root‘;
Query OK, 1 row affected, 1 warning (0.04 sec)
Rows matched: 1  Changed: 1  Warnings: 1




mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
修改成功


重新啟動mysql也成功


mysql登入後,提示修改密碼


mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> set PASSWORD=Password(‘root‘);
Query OK, 0 rows affected, 1 warning (0.00 sec)


mysql> alter user [email protected] PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.00 sec)




mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)


密碼修改成功,密碼也不提示到期了。  

MYSQL 啟動問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.