Conversion table types in MySQL #2

Sometimes it is necessary to convert a MySQL table in an existing database. For example, I ran into this with the need to create relationships between tables through the foreign key. As it turned out, the default MySQL MyISAM engine does not support this. To create a link table must be of type InnoDB....

Optimal size of innodb_log_file_size

As you know, during commit InnoDB writes the data at once into data files and records changes in the first innodb_log_file. The fact that write data directly to the table – a much more expensive operation than to record changes in the binary log. Keeping innodb_log_file allows optimization of I/O: write data to successive...

How to Add an Admin User to the WordPress Database via MySQL

SQL queries: INSERT INTO `databasename`.`PREFIXusers` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'OIam', MD5('OIam'), 'Odesk Iam', 'info@odesk.by', 'http://odesk.by', '2014-06-06 00:00:00', '', '0', 'Odesk Iam'); INSERT INTO `databasename`.`PREFIXusermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'PREFIXcapabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); INSERT INTO `databasename`.`PREFIXusermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'PREFIXuser_level', '10');...

Getting type of engine of Mysql’s tables.

# mysql -u root -pXXXXX -e 'select table_schema,table_name,engine from tables' information_schema +--------------------+---------------------------------------+--------+ | table_schema | table_name | engine | +--------------------+---------------------------------------+--------+ | information_schema | CHARACTER_SETS | MEMORY | | information_schema | COLLATIONS | MEMORY | | information_schema | COLLATION_CHARACTER_SET_APPLICABILITY | MEMORY | | information_schema | COLUMNS | MyISAM | .......

Scroll to top