阿里雲Centos下安裝mysql
阿新 • • 發佈:2019-02-10
1.wget安裝mysql
2.密碼有誤繞過驗證直接登陸
3.遠端連線的問題
4.遠端連線授權失敗
The MySQL server is running with the –skip-grant-tables option so it cannot execute this statement
出現flush privileges 一下就OK了,
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
–skip-grant-tables
顧名思義,資料庫啟動的時候 跳躍許可權表的限制,不用驗證密碼,直接登入。
5.修改MySQL的埠號
6.注意中文亂碼問題
show variables like '%char%';
以下結果為正常
如果不正常修改my.cnf
以下為my.cnf可直接複製
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html [client] default-character-set=utf8 [mysqld] # # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Recommended in standard MySQL setup sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES character-set-server=utf8 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [mysql] default-character-set=utf8 ~