安装后MySQL的error log提示:[Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.# sudo mysql -urootmysql> alter user root@localhost identified with mysql_native_password as '*xxxxx';【阅读全文】
我想知道 MySQL 表在磁盘上占用多少空间,但看起来很琐碎。不应该在 INFORMATION_SCHEMA.TABLES 中提供这些信息吗?没那么简单!这个看似简单的问题实际上在 MySQL 中非常复杂。MySQL 支持许多存储引擎(其中一些根本不在磁盘上存储数据), 不同的存储数据格式。例如,InnoDB 存储引擎为 MySQL 5.7 提供了三种“基本”格...【阅读全文】
修改my.cnf:[mysqlld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sock# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidsocket=/var/lib/mysql/mysql.sockcharacter_set_server=utf8[cl...【阅读全文】
首先使用Navicat连接mysql,输入配置后保错:1130-Host‘XXX.XXX.XXX.XXX’ is not allowedto connect to this MySQL server 发现这是权限的问题,远程服务器无权限登录MySQL。那就修改权限: GRANT ALL PRIVILEGES ON *.*...【阅读全文】
[Note] RSA private key file not found: /db/mysql5.6/data//private_key.pem. Some authentication plugins will not work.[Note] RSA public key file not found: /db/mysql5.6/data//public_key.pem. Some authentication plugins will not work. 1.检查是否安装openssl2.利用openssl生成公有和私有key$ open...【阅读全文】
mysql> SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user; mysql> show grants for 'root'@'localhost'; mysql> select * from mysql.user where user='root' \G; mysql> desc mysql.user; mysql> GRANT ALL ON *.* TO `用户名`@`127.0.0...【阅读全文】