Solved MySQL engine change problem

Hello FreeBSD, recently i intalled the version of FreebSD 11.3 with MySQL 5.6, but here is a problem.
My database uses engine myisam, after the forum members say, add in my.cnf default-storage-engine=myisam and the problem will be solved, but on the contrary, it will not be solved.
I tried the option default_storage_engine=myisam, but nothing.. Keep running on InnoDB ..
Can anyone advise me what i could do?
 
Database engines don't change on existing tables. You will need to convert them manually from one engine to another. If the tables have been created with MyISAM they're going to stay that way regardless of the default setting. The default setting only comes into play when creating new tables and not supplying the engine.
 
No, what I meant is that tables that have been created with MyISAM are going to stay with MyISAM.

Look at the output from something like SHOW CREATE TABLE <tablename>. The engine is usually at the end:
Code:
mysql> show create table users \G
*************************** 1. row ***************************
       Table: users
Create Table: CREATE TABLE `users` (
  `userid` bigint(20) unsigned NOT NULL,
  `alias` varchar(100) NOT NULL DEFAULT '',
  `name` varchar(100) NOT NULL DEFAULT '',
  `surname` varchar(100) NOT NULL DEFAULT '',
  `passwd` varchar(32) NOT NULL DEFAULT '',
  `url` varchar(255) NOT NULL DEFAULT '',
  `autologin` int(11) NOT NULL DEFAULT '0',
  `autologout` varchar(32) NOT NULL DEFAULT '15m',
  `lang` varchar(5) NOT NULL DEFAULT 'en_GB',
  `refresh` varchar(32) NOT NULL DEFAULT '30s',
  `type` int(11) NOT NULL DEFAULT '1',
  `theme` varchar(128) NOT NULL DEFAULT 'default',
  `attempt_failed` int(11) NOT NULL DEFAULT '0',
  `attempt_ip` varchar(39) NOT NULL DEFAULT '',
  `attempt_clock` int(11) NOT NULL DEFAULT '0',
  `rows_per_page` int(11) NOT NULL DEFAULT '50',
  PRIMARY KEY (`userid`),
  UNIQUE KEY `users_1` (`alias`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
This is a table used by Zabbix, it shows it uses the InnoDB engine. If you want to change the engine you will have to use, for example, ALTER TABLE <tablename> ENGINE=InnoDB; or ALTER TABLE <tablename> ENGINE=MyISAM;.

The default is just that, a default. If you use CREATE TABLE something; it will be created with the default engine. If you must be sure it's created with a specific engine you'll need to use something like CREATE TABLE something ENGINE=MyISAM;.

 
Hello SirDice , oh, right now i understand.
I checked, all tables are MyISAM, but ive a problem. When I run the start script, the database shuts down.
When I run service mysql-server status appear
mysql is not running.
Why can it be? Where can i see the logs?
 
Righ, i know about this file, but the problem is that when i run the start command .pid and .err files disappear.
Only those files remain
 
The error log doesn't disappear, it doesn't even get rotated. It may be stored somewhere else though, you can set the name and location in my.cnf for example.

How are you starting MySQL?
 
It doesnt matter anymore, i did something wrong and now everything runs smoothly. Thank you for your patience.
 
Back
Top