第一次用sudo 安装mysql,用root 去做安转没有什么问题, 2013-06-30 21:47:54 44428 [Note] InnoDB: 5.6.11 started; log sequence number 1626047 2013-06-30 21:47:54 44428 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: a9db10f9-e18b-11e2-bc45-d89d67176ba4. /data/mysql/bin/mysqld: File ""./auto.cnf"" not found (Errcode: 13 - Permission denied) 2013-06-30 21:47:54 44428 [ERROR] Failed to create file(file: ""./auto.cnf"", errno 13) 2013-06-30 21:47:54 44428 [ERROR] Initialzation of the server""s UUID failed because it could not be read from the auto.cnf file. If this is a new server, the initialization failed because it was not possible to generate a new UUID. 2013-06-30 21:47:54 44428 [ERROR] Aborting 求指导 |
|
40分 |
检查一下/data/mysql/bin/mysqld 文件夹的权限
|
[dbaroot@twpdb06 data]$ cd .. [dbaroot@twpdb06 mysql]$ ls -la bin/mysqld -rwxr-xr-x. 1 mysql mysql 75509871 Apr 5 21:40 bin/mysqld [dbaroot@twpdb06 mysql]$ |
|
20分 |
贴出错误日志信息。
|
全的error log 130630 21:47:55 mysqld_safe mysqld from pid file /data/mysql/data/twpdb06.pid ended 130630 22:05:54 mysqld_safe Starting mysqld daemon with databases from /data/mysql/data 2013-06-30 22:05:54 44629 [Note] Plugin ""FEDERATED"" is disabled. 2013-06-30 22:05:54 44629 [Note] InnoDB: The InnoDB memory heap is disabled 2013-06-30 22:05:54 44629 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2013-06-30 22:05:54 44629 [Note] InnoDB: Compressed tables use zlib 1.2.3 2013-06-30 22:05:54 44629 [Note] InnoDB: Using Linux native AIO 2013-06-30 22:05:54 44629 [Note] InnoDB: Using CPU crc32 instructions 2013-06-30 22:05:54 44629 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2013-06-30 22:05:54 44629 [Note] InnoDB: Completed initialization of buffer pool 2013-06-30 22:05:54 44629 [Note] InnoDB: Highest supported file format is Barracuda. 2013-06-30 22:05:54 44629 [Note] InnoDB: 128 rollback segment(s) are active. 2013-06-30 22:05:54 44629 [Note] InnoDB: Waiting for purge to start 2013-06-30 22:05:54 44629 [Note] InnoDB: 5.6.11 started; log sequence number 1626057 2013-06-30 22:05:54 44629 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 2e01771e-e18e-11e2-bc55-d89d67176ba4. /data/mysql/bin/mysqld: File ""./auto.cnf"" not found (Errcode: 13 - Permission denied) 2013-06-30 22:05:54 44629 [ERROR] Failed to create file(file: ""./auto.cnf"", errno 13) 2013-06-30 22:05:54 44629 [ERROR] Initialzation of the server""s UUID failed because it could not be read from the auto.cnf file. If this is a new server, the initialization failed because it was not possible to generate a new UUID. 2013-06-30 22:05:54 44629 [ERROR] Aborting 2013-06-30 22:05:54 44629 [Note] Binlog end 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""partition"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""BLACKHOLE"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""PERFORMANCE_SCHEMA"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""ARCHIVE"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_SYS_DATAFILES"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_SYS_TABLESPACES"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_SYS_FOREIGN_COLS"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_SYS_FOREIGN"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_SYS_FIELDS"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_SYS_COLUMNS"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_SYS_INDEXES"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_SYS_TABLESTATS"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_SYS_TABLES"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_FT_INDEX_TABLE"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_FT_INDEX_CACHE"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_FT_CONFIG"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_FT_BEING_DELETED"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_FT_DELETED"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_FT_DEFAULT_STOPWORD"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_METRICS"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_BUFFER_POOL_STATS"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_BUFFER_PAGE_LRU"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_BUFFER_PAGE"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_CMP_PER_INDEX_RESET"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_CMP_PER_INDEX"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_CMPMEM_RESET"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_CMPMEM"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_CMP_RESET"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_CMP"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_LOCK_WAITS"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_LOCKS"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""INNODB_TRX"" 2013-06-30 22:05:54 44629 [Note] Shutting down plugin ""InnoDB"" 2013-06-30 22:05:54 44629 [Note] InnoDB: FTS optimize thread exiting. 2013-06-30 22:05:54 44629 [Note] InnoDB: Starting shutdown... 2013-06-30 22:05:56 44629 [Note] InnoDB: Shutdown completed; log sequence number 1626067 2013-06-30 22:05:56 44629 [Note] Shutting down plugin ""MRG_MYISAM"" 2013-06-30 22:05:56 44629 [Note] Shutting down plugin ""MyISAM"" 2013-06-30 22:05:56 44629 [Note] Shutting down plugin ""CSV"" 2013-06-30 22:05:56 44629 [Note] Shutting down plugin ""MEMORY"" 2013-06-30 22:05:56 44629 [Note] Shutting down plugin ""sha256_password"" 2013-06-30 22:05:56 44629 [Note] Shutting down plugin ""mysql_old_password"" 2013-06-30 22:05:56 44629 [Note] Shutting down plugin ""mysql_native_password"" 2013-06-30 22:05:56 44629 [Note] Shutting down plugin ""binlog"" 2013-06-30 22:05:56 44629 [Note] /data/mysql/bin/mysqld: Shutdown complete 130630 22:05:56 mysqld_safe mysqld from pid file /data/mysql/data/twpdb06.pid ended [dbaroot@twpdb06 data]$ cd .. [dbaroot@twpdb06 mysql]$ ls -la bin/mysqld -rwxr-xr-x. 1 mysql mysql 75509871 Apr 5 21:40 bin/mysqld [dbaroot@twpdb06 mysql]$ |
|
20分 |
sudo -l 列出目前的权限
|
[dbaroot@twpdb06 data]$ sudo -l [sudo] password for dbaroot: Matching Defaults entries for dbaroot on this host: requiretty, !visiblepw, always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin User dbaroot may run the following commands on this host: (ALL) ALL [dbaroot@twpdb06 data]$ |
|
20分 |
看看mysql的data目录是否是mysql属性的
|
[dbaroot@twpdb06 mysql]$ ls -la total 88 drwxr-xr-x. 13 root mysql 4096 Jun 28 03:23 . drwxr-xr-x. 5 root root 4096 Jun 28 03:20 .. drwxr-xr-x. 2 mysql mysql 4096 Jun 28 03:19 bin -rw-r--r--. 1 root mysql 17987 Apr 5 20:27 COPYING drwxr-xr-x. 5 root mysql 4096 Jun 30 22:05 data drwxr-xr-x. 2 root mysql 4096 Jun 28 03:19 docs drwxr-xr-x. 3 root mysql 4096 Jun 28 03:19 include -rw-r--r--. 1 root mysql 7468 Apr 5 20:27 INSTALL-BINARY drwxr-xr-x. 3 root mysql 4096 Jun 28 03:19 lib drwxr-xr-x. 4 root mysql 4096 Jun 28 03:19 man -rw-r--r--. 1 root root 943 Jun 28 03:23 my.cnf drwxr-xr-x. 10 root mysql 4096 Jun 28 03:19 mysql-test -rw-r--r--. 1 root mysql 2552 Apr 5 20:27 README drwxr-xr-x. 2 root mysql 4096 Jun 28 03:19 scripts drwxr-xr-x. 28 root mysql 4096 Jun 28 03:19 share drwxr-xr-x. 4 root mysql 4096 Jun 28 03:19 sql-bench drwxr-xr-x. 3 root mysql 4096 Jun 28 03:19 support-files [dbaroot@twpdb06 mysql]$ |
|
很多my.cnf 文件啊,究竟mysqld_safe –user=MySQL 用哪一个my.cnf?汗
[dbaroot@twpdb06 mysql]$ sudo find / -name my.cnf /etc/my.cnf /usr/my.cnf /data/mysql/my.cnf /data/mysql/mysql-test/suite/ndb_binlog/my.cnf /data/mysql/mysql-test/suite/ndb_rpl/my.cnf /data/mysql/mysql-test/suite/ndb/my.cnf /data/mysql/mysql-test/suite/ndb_team/my.cnf /data/mysql/mysql-test/suite/ndb_big/my.cnf /data/mysql/mysql-test/suite/rpl/my.cnf /data/mysql/mysql-test/suite/rpl/extension/bhs/my.cnf /data/mysql/mysql-test/suite/rpl_ndb/my.cnf /data/mysql/mysql-test/suite/federated/my.cnf [dbaroot@twpdb06 mysql]$ |
|
请问楼主最后怎么解决的
|