linux安装最新mysql5.5,my.cnf找不到
mysql的安装路径应该是/usr/share/mysql:
[root@CentOS202 Desktop]# ls /usr/share/mysql/ -l总计 1320-rwxr-xr-x 1 root root 1153 11-23 23:12 binary-configuredrwxr-xr-x 2 root root 4096 12-29 23:06 charsets-rwxr-xr-x 1 root root 4528 11-23 23:12 config.huge.ini-rwxr-xr-x 1 root root 2382 11-23 23:12 config.medium.ini-rwxr-xr-x 1 root root 1626 11-23 23:12 config.small.inidrwxr-xr-x 2 root root 4096 12-29 23:06 czechdrwxr-xr-x 2 root root 4096 12-29 23:06 danishdrwxr-xr-x 2 root root 4096 12-29 23:06 dutchdrwxr-xr-x 2 root root 4096 12-29 23:06 english-rwxr-xr-x 1 root root 469420 11-23 20:46 errmsg-utf8.txtdrwxr-xr-x 2 root root 4096 12-29 23:06 estonian-rwxr-xr-x 1 root root 619777 11-23 20:46 fill_help_tables.sqldrwxr-xr-x 2 root root 4096 12-29 23:06 frenchdrwxr-xr-x 2 root root 4096 12-29 23:06 germandrwxr-xr-x 2 root root 4096 12-29 23:06 greekdrwxr-xr-x 2 root root 4096 12-29 23:06 hungariandrwxr-xr-x 2 root root 4096 12-29 23:06 italiandrwxr-xr-x 2 root root 4096 12-29 23:06 japanesedrwxr-xr-x 2 root root 4096 12-29 23:06 korean-rwxr-xr-x 1 root root 773 11-23 20:46 magic-rwxr-xr-x 1 root root 4697 11-23 23:12 my-huge.cnf-rwxr-xr-x 1 root root 19779 11-23 23:12 my-innodb-heavy-4G.cnf-rwxr-xr-x 1 root root 4671 11-23 23:12 my-large.cnf-rwxr-xr-x 1 root root 4682 11-23 23:12 my-medium.cnf-rwxr-xr-x 1 root root 2846 11-23 23:12 my-small.cnf-rwxr-xr-x 1 root root 1061 11-23 23:12 mysqld_multi.server-rwxr-xr-x 1 root root 789 11-23 23:12 mysql-log-rotate-rwxr-xr-x 1 root root 10585 11-23 23:12 mysql.server-rwxr-xr-x 1 root root 3258 11-23 20:46 mysql_system_tables_data.sql-rwxr-xr-x 1 root root 28995 11-23 20:46 mysql_system_tables.sql-rwxr-xr-x 1 root root 10371 11-23 20:46 mysql_test_data_timezone.sql-rwxr-xr-x 1 root root 1326 11-23 23:12 ndb-config-2-node.inidrwxr-xr-x 2 root root 4096 12-29 23:06 norwegiandrwxr-xr-x 2 root root 4096 12-29 23:06 norwegian-nydrwxr-xr-x 2 root root 4096 12-29 23:06 polishdrwxr-xr-x 2 root root 4096 12-29 23:06 portuguesedrwxr-xr-x 2 root root 4096 12-29 23:06 romaniandrwxr-xr-x 2 root root 4096 12-29 23:06 russiandrwxr-xr-x 3 root root 4096 12-29 23:06 SELinuxdrwxr-xr-x 2 root root 4096 12-29 23:06 serbiandrwxr-xr-x 2 root root 4096 12-29 23:06 slovakdrwxr-xr-x 2 root root 4096 12-29 23:06 spanishdrwxr-xr-x 2 root root 4096 12-29 23:06 swedishdrwxr-xr-x 2 root root 4096 12-29 23:06 ukrainian[root@CentOS202 Desktop]#
[root@CentOS202 Desktop]# ll /var/lib/mysql/总计 28752-rw-rw---- 1 mysql mysql 9939 12-29 23:12 CentOS202.err-rw-rw---- 1 mysql mysql 18874368 12-29 23:12 ibdata1-rw-rw---- 1 mysql mysql 5242880 12-29 23:12 ib_logfile0-rw-rw---- 1 mysql mysql 5242880 12-24 15:48 ib_logfile1drwx--x--x 2 mysql mysql 4096 12-24 15:46 mysqldrwx------ 2 mysql mysql 4096 12-24 15:46 performance_schema-rw-r--r-- 1 mysql mysql 652 12-29 23:06 RPM_UPGRADE_HISTORY-rw-r--r-- 1 mysql mysql 522 12-29 23:06 RPM_UPGRADE_MARKER-LASTdrwxr-xr-x 2 mysql mysql 4096 12-24 15:46 test[root@CentOS202 Desktop]#
[解决办法]
这个没有的话可以自己配的,我的就是自己配的。
如果/etc/目录下没有my.cnf 配置文件,可以到/usr/share/mysql/下找到*.cnf 文件,拷贝其中一个到/etc/并改名为my.cnf)。
然后你根据自己的需要修改部分参数就可以了。