myisamchk is a command line tool to repair MySQL MyISAM database. You need to run it a user root. To repair all MyISAM tables in a database, run Example [root@localhost ~]# myisamchk –recover /var/lib/mysql/w3blogs/wp_blogs – recovering (with sort) MyISAM-table ‘/var/lib/mysql/w3blogs/wp_blogs’
MySQL Slow Query Log i used to find SQL query that are slow. To enable Slow Query Log, add following to /etc/my.cnf file under [mysqld] section. If you don’ have folder /var/log/mysql/, create it Now restart MySQL or
Here are some of the configurations for MySQL, some of these are already set on your server. When you edit MySQL configuration file (/etc/my.cnf or /etc/mysql/my.cnf), you need to restart MySQL as it is only read when you start MySQL.
On Ubuntu 16.04, after MySQL (MariaDB) installed, you have no root password. Root is able to login with out any password. To set root password for MySQL, after installation, run You will be asked to set new password, also allow
mysqladmin is a command line tool provided as part of MySQL. To list MySQL run time variables, run To see value of open_files_limit, use grep with mysqladmin, for example MySQL Status Example [root@3blogger ~]# mysqladmin status Uptime: 77583 Threads: 2
To change MySQL root Password, login to MySQL as user root. Now run
To create a MySQL user, run Allow Access to all databases If you want to allow new user to have access to all database, run Allow access from Remote Host To allow access from remote host, create user with If
Create MySQL Database Click on ‘MySQL Databases‘ menu in ‘Databases section’ Under ‘Create New Database‘, enter the name of mysql database which you wish to create and then click on “Create Database” button. You have now successfully added the database.
When i take backup of a MySQL Database with large number of tables, i get following error When restoring this Database, i got similar error Solution This was caused due to open_files_limit limit. To fix, i edit /etc/my.cnf Added open_files_limit
This page links all MySQL related HOW-TOS. Install MySQL Install MariaDB on CentOS 7 Install MariaDB on CentOS 6 Install Percona Server (MySQL) Disable MySQL Strict Mode Secure MySQL Secure MySQL Installation with mysql_secure_installation MySQL Configuration MySQL Optimization MySQL Optimization
