Edit configuration file. vim /etc/my.cnf add “skip-grant-tables” in [mysqld] field. Save and exit Restart mysql servicesystemctl restart mysqld Login mysqlmysql -uroot -p Switch database to…
1、mysqld start mysql:./mysqld –defaults-file=/etc/my.cnf –user=root client connect: mysql –defaults-file=/etc/my.cnf or mysql -S /tmp/mysql.sock 2、mysqld_safe start mysql: ./mysqld_safe –defaults-file=/etc/my.cnf –user=root & client connect: mysql –defaults-file=/etc/my.cnf or…
1: excute command SET PASSWORD MySQL -u root mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘newpass’); 2:mysqladmin mysqladmin -u root password “newpass” You can excute…
一、从官网下载Percona5.7 需要注意是服务器的版本。我这里选择的是Percona-Server-5.7.20-19-r119-el6-x86_64-bundle.tar 二、解压 tar xvf Percona-Server-5.7.20-19-r119-el6-x86_64-bundle.tar 能够看到解压出7个文件 [root@localhost percona]# tar xvf Percona-Server-5.7.20-19-r119-el6-x86_64-bundle.tar Percona-Server-57-debuginfo-5.7.20-19.1.el6.x86_64.rpm Percona-Server-client-57-5.7.20-19.1.el6.x86_64.rpm Percona-Server-devel-57-5.7.20-19.1.el6.x86_64.rpm Percona-Server-rocksdb-57-5.7.20-19.1.el6.x86_64.rpm Percona-Server-server-57-5.7.20-19.1.el6.x86_64.rpm Percona-Server-shared-57-5.7.20-19.1.el6.x86_64.rpm Percona-Server-test-57-5.7.20-19.1.el6.x86_64.rpm Percona-Server-tokudb-57-5.7.20-19.1.el6.x86_64.rpm mv Percona-Server-5.7.20-19-r119-el6-x86_64-bundle.tar /opt 三 .…
I need to login mysql [root@localhost ~]# mysql -uroot -p123456 Warning: Using a password on the command line interface can be insecure. ERROR 2002 (HY000):…
only export table data , exclude table structure: mysqldump -uuser -ppassword -t db_name > /dump_name.sql only export table structure ,exclude table data: mysqldump -uuser -ppassword…
softwore information: os type: CentOS 6.3 version:mysql-5.5.28 master ip: 192.168.137.27 slave ip 192.168.137.28 How to deploy mysql,you can refer to https://www.roamway.com/55.html Edit configuartion file. vim…
在https://www.roamway.com/?p=421中我们分析了mysql性能优化前半部分,今天接着分析后半部分。 9.查询缓存(query cache): 通过执行show global status like ‘qcache%’; 可以得到查询缓存的情况,如下: 如果这些项目的值都为0 说明配置文件中没有设置查询缓存,请打开配置文件,然后在[mysqld]字段中配置 query_cache_type = 1 query_cache_size = x (1表示启用查询缓存,0表示关闭查询缓存),保存退出,重启mysql. 再次执行show global status like ‘qcache%’; 可以看到各项指标有值了。 分析:…