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表空间

相关内容

热门资讯

烈焰熊熊,堪比“原子弹”,欧洲... 据美国有线电视新闻网(CNN)7月29日报道,席卷法国西南部的大片野火燃烧得如此猛烈,以至于形成了一...
外交部:对日本熊本县地震遇难者... 据凤凰卫视报道,针对日本熊本县发生强震造成人员伤亡,中国外交部发言人毛宁7月29日在例行记者会上表示...
高铁喧哗被劝阻后叫嚣全家体制内... “女子高铁喧哗被劝阻后叫嚣全家体制内”一事迎来官方通报。据新京报报道,7月29日,辽宁北票市公安局发...
广东专业蓝牙耳机定制厂家推荐,... 在珠三角腹地,广东早已成为全球蓝牙耳机产业链的“心脏地带”。从深圳华强北的声学元件批发,到东莞、惠州...
格雷厄姆葬礼变地缘竞价场!两大... 有些葬礼,送别的是逝者;有些葬礼,演的却是活人最现实的政治博弈。当地时间7月28日,美国老牌鹰派参议...
一道小学数学题难住3名医学博士... 3名不同学校的博士同做一道数学题,谁最厉害?近日,一陕西网友发布的视频引发热议。29日,视频发布者“...
华为全新“小艺任务”亮相:整合... 7月29日,在华为鸿蒙电脑新品技术沟通会上,终端云服务小艺业务部总裁贾永利宣布,小艺将迎来“从对话到...
广西日报特稿《王的猜想》火了,... 澎湃新闻记者 蒋子文 实习生 汤煜炜为应对外界购买纸质版特稿《王的猜想》的热情,《广西日报》宣布紧急...
月租20元内!2026年平价云... 不少手游玩家、账号运营从业者挑选云手机时,首要诉求就是低价够用,想要控制每月支出在20元以内,同时兼...
诺奖得主如何看待王虹境遇?“我... 中村修二(2014年诺贝尔物理学奖得主)【导读】近日王虹与邓煜双双获得2026年菲尔兹奖,成为了首批...