Posts

Showing posts with the label mysql

The storage engine for the table doesn't support repair. InnoDB or MyISAM?

You cannot repair an InnoDB type table, If you want to repair them you’ll have to change the table engine from InnoDB to MyIsam. To Do this, follow these simple steps Open your phpmyadmin Select the database you want to repair. Look for the table(s) with InnoDB type storage engine and note down their names. Now you need to perform an SQL command by clicking on the SQL tab that appears on the top section of that page. Now use the command given below ALTER TABLE table_name ENGINE=MyISAM; Replace the table_name with the name of the table you want to change from InnoDB to MyISAM. Note: You will have to do the table change one by one. For each time, chose one table and change its engine and so on.

directadmin mysql password change

vi /usr/local/directadmin/conf/my.cnf cat /usr/local/directadmin/conf/mysql.conf /home/sas/dbbackup_scripts.sh

mysql modes

/usr/share/mysql my-huge.cnf my-large.cnf my-medium.cnf my-small.cnf just rename to my.cnf or MySQL config file in the respective location

Restore database in mysql

A common use of  mysqldump  is for making a backup of an entire database: shell > mysqldump db_name > backup-file . sql You can load the dump file back into the server like this: UNIX shell > mysql db_name < backup-file . sql The same in  Windows  command prompt: mysql - p - u [ user ] [ database ] < backup-file . sql PowerShell C :\> cmd . exe / c "mysql -u root -p db_name < backup-file.sql" MySQL command line mysql > use db_name ; mysql > source backup-file . sql ; got to the folder location backup-file . sql

How to Back Up and Restore MySQL Databases with Mysqldump

Mysqldump Command Syntax Before going into how to use the mysqldump command, let's start by reviewing the basic syntax. The mysqldump utility expressions take the following form: mysqldump [ options ] > file.sql Copy options  - The  mysqldump options file.sql  - The dump (backup) file To use the mysqldump command the MySQL server must be accessible and running. Backup a Single MySQL Database The most common use case of the mysqldump tool is to backup a single database. For example, to create a backup of the database named  database_name  using the user  root  and save it to a file named  database_name.sql  you would run the following command: mysqldump -u root -p database_name > database_name.sql You will be prompted to enter the root password. After successful authentication, the dump process will start. Depending on the database size, the process can take some time. If you are logged in as the same user t...