简体   繁体   English

MySQL无法在Xampp控制面板上启动

[英]MySQL is not starting on Xampp Control Panel

Error 错误

1:47:20 AM  [mysql]     Error: MySQL shutdown unexpectedly.
1:47:20 AM  [mysql]     This may be due to a blocked port, missing dependencies, 
1:47:20 AM  [mysql]     improper privileges, a crash, or a shutdown by another method.
1:47:20 AM  [mysql]     Press the Logs button to view error logs and check
1:47:20 AM  [mysql]     the Windows Event Viewer for more clues
1:47:20 AM  [mysql]     If you need more help, copy and post this
1:47:20 AM  [mysql]     entire log window on the forums

Log : 日志:

2013-12-12 01:33:01 3204 [Note] Plugin 'FEDERATED' is disabled.
 2013-12-12 01:33:01 828 InnoDB: Warning: Using innodb_additional_mem_pool_size     is 
 DEPRECATED. This option may be removed in future releases, together with 

the           option ``innodb_use_sys_malloc and with the InnoDB's internal 
memory           allocator. 
2013-12-12 01:33:01 3204 [Note] InnoDB: The InnoDB memory heap is disabled
2013-12-12 01:33:01 3204 [Note] InnoDB: Mutexes and rw_locks use Windows 
interlocked        functions  
2013-12-12 01:33:01 3204 [Note] InnoDB: Compressed tables use zlib 1.2.3
  2013-12-12 01:33:01 3204 [Note] InnoDB: Not using CPU crc32 instructions
 2013-12-12 01:33:01 3204 [Note] InnoDB: Initializing buffer pool, size = 16.0M
 2013-12-12 01:33:01 3204 [Note] InnoDB: Completed initialization of buffer pool
 2013-12-12 01:33:01 3204 [Note] InnoDB: Highest supported file format is Barracuda.
 2013-12-12 01:33:02 3204 [Warning] InnoDB: Resizing redo log from 2*3072 to 2*320    
  pages  , LSN=1625987 
2013-12-12 01:33:02 3204 [Warning] InnoDB: Starting to delete and rewrite log files.
2013-12-12 01:33:02 3204 [Note] InnoDB: Setting log file C:\xampp\mysql
\data\ib_logfile101 size to 5 MB

2013-12-12 01:33:02 3204 [Note] InnoDB: Setting log file C:\xampp\mysql     
\data\ib_logfile1 size to 5 MB

2013-12-12 01:33:02 3204 [Note] InnoDB: Renaming log file C:\xampp\mysql

facing this error , WHY ? 面对这个错误,为什么?

My friend! 我的朋友! it seems somke other application is running on the same port number as the apache or mysql. 似乎Somke其他应用程序正在与apache或mysql在相同的端口号上运行。 The default port number of apache server is 80 . apache服务器的默认端口号是80 Accidentally Skype uses the same port number as the apache server. Skype偶然使用与apache服务器相同的端口号。 And maybe the default port number 3306 used by mysql server is also being used by some other application. 也许其他服务器也正在使用mysql服务器使用的默认端口号3306 In my case it was the wampp server which also has mysql server inbuilt into it. 在我的情况下是wampp服务器,其中还内置了mysql服务器。

1. Changing the Apache servers port number. 1.更改Apache服务器的端口号。

                         Now what you gonna so it change the default port numbers of both the apache server and the mysql server
manually. To change the port number of apache, u have to o into the
xampp folder in your installation directory(Mine was C drive). In
there the file location would be : 

C:\\xampp\\apache\\conf C:\\ xampp \\ apache \\ conf

(Ur installation directory may as well be different). (您的安装目录可能也不同)。 In there theres a CONF file/configuration file named httpd.conf . 那里有一个名为httpd.conf的CONF文件/配置文件。 Open the file using any text editor and then try finding the number 80 manually or usiong a finder( Ctrl + F in notepad++ for ex.). 使用任何文本编辑器打开文件,然后尝试手动查找数字80或使用查找程序(例如,在notepad ++中为Ctrl + F )。 You will find them at #Listen 12.34.56.78:12 Listen 12 and ServerName localhost: 12 . 您将在#Listen 12.34.56.78:12中找到它们, 并收听12ServerName本地主机: 12 In both these places replace the number 80 with a well chosen number and remember that the number at all the places should be the same, and remember the number that you choose. 在这两个位置中,将80替换为选择好的数字,并记住所有位置的数字应相同,并记住您选择的数字。

2.Changing the port number for MySql server 2.更改MySql服务器的端口号

                         Now do the same thiong for Mysql server. It is located in 

C:\\xampp\\mysql\\bin C:\\ xampp \\ mysql \\ bin

named "my"(select and right click to view properties. Its an ini file). 名为“ my”(选择并右键单击以查看属性。它是一个ini文件)。 Open it with a text editor.Find 3306 and replace it with a well chosen and unique number at all the places(If u had changed the port number during installation or afterwards find that particular numbere and change it). 用文本编辑器打开它,找到3306并在所有位置上用一个精心选择的唯一编号替换它(如果您在安装过程中更改了端口号,或者之后找到了该特定的编号并进行了更改)。

3.Starting the Apache server and testing it 3,启动Apache服务器并进行测试

Start the Apache server using the XMPP control panel and then test the apache local server by entering the url into the browser as you always did. 使用XMPP控制面板启动Apache服务器,然后像往常一样通过在浏览器中输入URL来测试apache本地服务器。 But this time append localhost or 127.0.0.1 with 12 seperated by a semicolon, For ex : localhost:25 or 127.0.0.1:25 , if your new port number is 25 . 但这一次追加localhost或127.0.0.1,并用分号分隔12,例如: localhost:25127.0.0.1:25 (如果新端口号是25) And I think you will be good to go. 而且我认为您会很好。 If u have any further problems, feel free to ask.... 如果您还有其他问题,请随时提问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM