MYSQL数据库初始化时经常遇到的一些问题总结
admin
2023-04-23 17:23:13
0

下面一起来了解下MYSQL数据库初始化时经常遇到的一些问题,相信大家看完肯定会受益匪浅,文字在精不在多,希望MYSQL数据库初始化时经常遇到的一些问题这篇短内容是你想要的。 

初始化MYSQL数据库的时候提示缺少perl和data::dumper

这个时候需要安装两个包,

yum install perl

yum install autoconf

初始化MYSQL数据库的时候提示innodb数据库文件大小错误

2018-08-28 18:01:51 26794 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 768 pages (rounded down to MB) than specified in the .cnf file: initial 131072 pages, max 0 (relevant if non-zero) pages!
2018-08-28 18:01:51 26794 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2018-08-28 18:01:51 26794 [ERROR] Plugin 'InnoDB' init function returned error.
2018-08-28 18:01:51 26794 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-08-28 18:01:51 26794 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-08-28 18:01:51 26794 [ERROR] Aborting

这是因为系统中有其他my.cnf文件。只要初始化的时候指定初始化文件my.cnf,就可以了。

 /opt/mysql/scripts/mysql_install_db --datadir=/data/mysqldata/3306/data --basedir=/opt/mysql --defaults-file='/data/mysqldata/3306/my.cnf' 
Installing MySQL system tables...2018-08-28 18:04:30 0 [Note] /opt/mysql/bin/mysqld (mysqld 5.6.31-log) starting as process 26865 ...

OK

Filling help tables...2018-08-28 18:05:03 0 [Note] /opt/mysql/bin/mysqld (mysqld 5.6.31-log) starting as process 26889 ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  /opt/mysql/bin/mysqladmin -u root password 'new-password'
  /opt/mysql/bin/mysqladmin -u root -h mysql01 password 'new-password'

Alternatively you can run:

  /opt/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

  cd . ; /opt/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

  cd mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

WARNING: Found existing config file /opt/mysql/my.cnf on the system.
Because this file might be in use, it was not replaced,
but was used in bootstrap (unless you used --defaults-file)
and when you later start the server.
The new default config file was created as /opt/mysql/my-new.cnf,
please compare it with your file and take the changes you need.

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the

--defaults-file argument to mysqld_safe when starting the server

看完MYSQL数据库初始化时经常遇到的一些问题总结这篇文章后,很多读者朋友肯定会想要了解更多的相关内容,如需获取更多的行业信息,可以关注我们的行业资讯栏目。

上一篇:数据表和特殊的表

下一篇:Oracle表空间

相关内容

热门资讯

王虹赴法留学推荐信首次曝光,由... 7月28日,王虹推荐信 话题词冲上热搜第一。记者查询发现,近日刚获得有“数学界诺贝尔奖”美誉的菲尔兹...
原创 中... 柏林郊外一块不起眼的试验田里,几个德国研究员蹲在白菜地里忙活了三四年。他们手上那瓶液体不是化肥店买来...
原创 2... 新能源车这些年跑得飞快,可有个心结一直没解开。车主晚上把车停进地库,心里多少还是打个鼓——万一它半夜...
“最强模型”公开,人人都可自由... 7月27日深夜,月之暗面(Moonshot AI)宣布开源Kimi K3模型权重,发布47页技术报告...
MIT给VLA加“外挂”,让机... 视觉—语言—动作模型(VLA)已经能够完成不少复杂的机器人任务,但在实际运行中,机器人通常需要先停下...
华硕Intel 800系主板助... 随着本地大模型、AI绘图、AI视频生成以及智能办公等应用快速普及,AI主机正逐渐成为2026年DIY...
“七姐妹”市值一夜蒸发5.8万... 出品 | 搜狐科技 作者 | 梁昌均 美股遭遇“黑色星期四”。最新交易日,美股三大指数集体重挫,纳指...
OpenAI智能体攻击范围扩大... 【CNMO科技消息】7月29日,据路透社报道,此前引发关注的OpenAI智能体入侵Hugging F...
华为苹果正面硬刚 华为Mate... PChome 7月29日消息,据数码闲聊站爆料,国内手机品牌将于9月举办两场重磅发布会,9月上旬推出...