简述:此次主要是因为搬迁机房,原来一台09年的ubuntu安装的9.x的系统,后来升级过内核为10.x,上面服务配置混乱需要整理,领导想要升级系统,重装跟以前服务器上一样的软件。由于年代久远,现在系统升级为16.x比较难找到老版本source.list源,试过离线自己做本地源,依赖解决不了,最后再国外找到一个比较全的源。安装完成后,MysqL没有配置文件,自己手动自定义有问题,最后经过查找帮助配置文件,解决,具体如下
[client] port=3306 socket=/var/run/MysqLd/MysqLd.sock default-character-set=utf8 [MysqLd] port=3306 socket=/var/run/MysqLd/MysqLd.sock
#一、不能创建MysqLd.pid
#与my-innodb-heavy-4G.cnf比较,一定要修改成上面不然老是报错
#[ERROR] /usr/sbin/MysqLd: Can't create/write to file '/var/run/MysqLd/MysqLd.pid' (Errcode: 13)
#[ERROR] Can't start server: can't create PID file: Permission denied
skip-external-locking default-character-set=utf8 init_connect='SETNAMESutf8' key_buffer=16M max_allowed_packet=4M thread_stack=256K thread_cache_size=128 table_cache=1024 thread_concurrency=10 sort_buffer_size=6M read_buffer_size=4M join_buffer_size=8M myisam_sort_buffer_size=16M tmp_table_size=128M query_cache_limit=4M query_cache_size=32M set-variable=innodb_buffer_pool_size=4G set-variable=innodb_additional_mem_pool_size=64M myisam-recover=BACKUP max_connections=1000 expire_logs_days=10 max_binlog_size=100M skip-federated
#另外注意这几个文件的连接情况
root@ubuntu16-slyey:/etc/MysqL#ls-al/etc/MysqL/my.cnf.fallback -rwxr-xr-x1rootroot833Jan1115:17/etc/MysqL/my.cnf.fallback root@ubuntu16-slyey:/etc/MysqL#ls-al/etc/alternatives/my.cnf.fallback lrwxrwxrwx1rootroot26Jan1114:56/etc/alternatives/my.cnf.fallback->/etc/MysqL/my.cnf.fallback root@ubuntu16-slyey:/etc/MysqL#ls-al/etc/MysqL/my.cnf lrwxrwxrwx1rootroot33Jan1113:43/etc/MysqL/my.cnf->/etc/alternatives/my.cnf.fallback
#三、排错方法
#重要的排错方法
#systemctl status MysqL.service #查看状态信息
#journalctl -xe #查看具体错误信息
#dpkg-Lsoftname #dpkg-ssoftname #dpkg-Ssoftname #aptitude #apt-filelistsoftname #/usr/share/doc/MysqL-server-5.0/examples/my-large.cnf.gz #/usr/share/doc/MysqL-server-5.0/examples/my-small.cnf #/usr/share/doc/MysqL-server-5.0/examples/ndb_mgmd.cnf #/usr/share/doc/MysqL-server-5.0/examples/my-huge.cnf.gz #/usr/share/doc/MysqL-server-5.0/examples/my-innodb-heavy-4G.cnf.gz原文链接:https://www.f2er.com/ubuntu/354966.html