我为包含MariaDB的OS X下载了XAMPP for OS X 5.6.14。 现在我想从数据库中更改datadir,但这不起作用。如果我启动mysql,来自XAMPP控件的灯是红色的,但服务“mysql”正在运行......
my.cnf看起来像这样:
[client]
socket = /Users/tobias/Documents/Webserver/mysql/mysql.sock
[mysqld]
socket = /Users/tobias/Documents/Webserver/mysql/mysql.sock
datadir = /Users/tobias/Documents/Webserver/mysql/
innodb_data_home_dir = /Users/tobias/Documents/Webserver/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /Users/tobias/Documents/Webserver/mysql/
我将旧目录中的所有文件复制到新目录并尝试启动mysql。 之后,我收到了以下错误消息:
2015-12-05 19:50:18 140735225118720 [ERROR] Missing system table mysql.roles_mapping; please run mysql_upgrade to create it
2015-12-05 19:50:18 140735225118720 [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'), found type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_A
2015-12-05 19:50:18 140735225118720 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
然后我运行mysql_upgrade,错误消失了。 我在日志中没有错误但数据库无法启动...服务正在运行,但Manager中的指示灯为红色。 phpmyadmin无法连接到db
有没有人有关于如何将mysql数据库目录移动到新目录的教程?
新文件夹的权限设置为mysql:mysql
谢谢!