查看mysql中数据库或表所占空间的大小目录[TOC]1.计算数据库的总大小修改your_database_name为实际数据库名字即可SELECT
table_schema AS `Database`,
SUM(data_length + index_length) / 1024 / 1024 AS `Size (MB)`
FROM
information_schema.tables
WHERE
table_schema = 'your_datab...
目录[TOC]dropdrop user XXX;删除已存在的用户,默认删除的是'XXX'@'%'这个用户,如果还有其他的用户如'XXX'@'localhost'等,不会一起被删除。如果要删除'XXX'@'localhost',使用drop删除时需要加上host即drop user 'XXX'@'localhost';。deletedelete from user where user='XXX' and host='localhost';其中XXX为用户名,localhost为主机名。区...
目录[TOC]报错使用Navicat Premium连接mysql时可以连接,但是创建新数据库时报错:1044 - Access denied for user 'root'@'%' to database 'enjoy!!'解决方法可能是因为root没有权限法一:直接修改权限表:
root@server:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g...
目录[TOC]问题执行mysql_secure_installation进行初始化时报错:Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER inst...
目录[TOC]问题执行grant all on . to root@’%’ identified by ‘password’ with grant option;时报错:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql&g...