Skip to content

Instantly share code, notes, and snippets.

@irazasyed
Last active October 4, 2024 00:27
Show Gist options
  • Save irazasyed/c516682e34068b14b55d to your computer and use it in GitHub Desktop.
Save irazasyed/c516682e34068b14b55d to your computer and use it in GitHub Desktop.
AMPPS MySQL not working, Solution!

AMPPS MySQL not working, Solution!

  1. Open Ampps Application -> MySQL Tab -> Configuration.

  2. In [mysqld] section, add the following line: innodb_force_recovery = 1

  3. Save the file and try starting MySQL

  4. Remove that line which you just added and Save.

@cnivesh009
Copy link

There might be many reasons why mysql won't start, but one of the reasons why this happens is - unusual shutdown of mysql, which can be viewed in the error log as pointed out by @r-wells

In my case, I restarted my computer without quitting the Ampps and the error log stated that mysql was not shut down correctly
So make sure to quit Ampps before restarting the system or shutting it down.

However, if mysql is not shut down correctly and innodb_force_recovery = 1 doesn't work then:
run the ampps set up again without deleting the ampps or mysql.

@sidmike
Copy link

sidmike commented Sep 25, 2019

There might be many reasons why mysql won't start, but one of the reasons why this happens is - unusual shutdown of mysql, which can be viewed in the error log as pointed out by @r-wells

In my case, I restarted my computer without quitting the Ampps and the error log stated that mysql was not shut down correctly
So make sure to quit Ampps before restarting the system or shutting it down.

However, if mysql is not shut down correctly and innodb_force_recovery = 1 doesn't work then:
run the ampps set up again without deleting the ampps or mysql.

Worked as hell! Thanks.

@emmanuelkolawole4
Copy link

Any help please, the admin and home [ages fail to load completely like it should in the tutorial video.
i've loaded both pages with and without internet and its the same
Screenshot (1)
Screenshot (2)

@cnivesh009
Copy link

Any help please, the admin and home [ages fail to load completely like it should in the tutorial video.
i've loaded both pages with and without internet and its the same
Screenshot (1)
Screenshot (2)

If you haven’t done already then:

  • Restart your system and check whether it works.

If first fails then:

  • Uninstall ampps from control panel, remove any existing folder and files and then run you ampps set up but make sure you are online as your setup may use internet to download certain files.

@emmanuelkolawole4
Copy link

I have done this about 3 times now and it's the same thing over and over again

Any help please, the admin and home [ages fail to load completely like it should in the tutorial video.
i've loaded both pages with and without internet and its the same
Screenshot (1)
Screenshot (2)

If you haven’t done already then:

  • Restart your system and check whether it works.

If first fails then:

  • Uninstall ampps from control panel, remove any existing folder and files and then run you ampps set up but make sure you are online as your setup may use internet to download certain files.

I have done this about 3 times now and it's the same over and over again

@jig209
Copy link

jig209 commented Dec 25, 2019

MYSQL still doesn't work 4 me...plz help me to find out solution..

@cnivesh009
Copy link

@emmanuelkolawole4 did you use wampserver setup? I used Ampps setup; if it is not inconvenient for you, then I would suggest you try latest Ampps setup (make sure it is of correct bit 64 or 32 bit) and check if you are facing the same issue.

@arout77
Copy link

arout77 commented Feb 2, 2020

Worked for me, thank you

@w4cdev
Copy link

w4cdev commented Feb 27, 2020

Hello,

AMPPS 3.9 32x with Win10 = Path E:/AMPPS/MySql which worked almost for an year, having issue that were solved until now.

The project was fine until recently stuck up for localhost conection mysql, which were working fine upto the fourth previous day. Four days back since that error up in PHPmyAdmin failing connect to MySQL, Used all the issue resultion and checksum, but failed to work. Used innodb force recovery technic and other port setting, firewall, VC++ Pack, inbound rules everything worked at par, but still error " phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

AMPPS Control Panel before it stopped working had been configured to 3306 since installation. The project were installed thru softaculous installer in AMPPS with "https://". Knew that Port 3307 used in remote server. No worry the port 3306 with https:// still worked for almost a month and all of a sudden four days back the PHPmyAdmin Connection error.

PHPmyAdmin Config

The mysql config with my.conf having the 'mysql'

mysqld]

The TCP/IP Port the MySQL Server will listen on

port=3306

#Path to installation directory. All paths are usually resolved relative to this.
basedir="{$path}/mysql/"

#Path to the database root
datadir="{$path}/mysql/data/"

socket = "{$path}/mysql/mysql.sock"
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
lower_case_table_names=2
innodb_force_recovery = 1
server-id = 1

I tried using alternate means by MySQL WorkBench and trying to set this out, but the config hassle is further reducing the project database already in the MySQL (AMPPS) to be also used by MySQL80 (Workbench) for laternative @Remedy

@Panopticoncept
Copy link

I think AMPPS has many flaws and it's not many reliable application.
I have installed in the past week it and soon I have received a blank page when I launched the "localhost page".
Well, I resolved this issue but a few of day after MySQL doesn't work.
In conclusion, I think AMPPS want to do many things but nothing made well.
So I go to use MAMPS which at any rate do what it tells.

@DATUC
Copy link

DATUC commented Aug 7, 2020

Hi also facing this bad problem since a time now but this usually happen after a windows update i have look around to see if ther was a Github link for Ampps dev because the forum link is not interesting no post have a response under 3 to 7 days and even month

@sadiqsonalkar
Copy link

in my case, everthing is working but the only thing is i cant see ampps admin or home option.

@dansouza83
Copy link

Doesn's work anymore.. sorry

@dansouza83
Copy link

Hello,

AMPPS 3.9 32x with Win10 = Path E:/AMPPS/MySql which worked almost for an year, having issue that were solved until now.

The project was fine until recently stuck up for localhost conection mysql, which were working fine upto the fourth previous day. Four days back since that error up in PHPmyAdmin failing connect to MySQL, Used all the issue resultion and checksum, but failed to work. Used innodb force recovery technic and other port setting, firewall, VC++ Pack, inbound rules everything worked at par, but still error " phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

AMPPS Control Panel before it stopped working had been configured to 3306 since installation. The project were installed thru softaculous installer in AMPPS with "https://". Knew that Port 3307 used in remote server. No worry the port 3306 with https:// still worked for almost a month and all of a sudden four days back the PHPmyAdmin Connection error.

PHPmyAdmin Config

The mysql config with my.conf having the 'mysql'

mysqld]

The TCP/IP Port the MySQL Server will listen on

port=3306

#Path to installation directory. All paths are usually resolved relative to this.
basedir="{$path}/mysql/"

#Path to the database root
datadir="{$path}/mysql/data/"

socket = "{$path}/mysql/mysql.sock"
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
lower_case_table_names=2
innodb_force_recovery = 1
server-id = 1

I tried using alternate means by MySQL WorkBench and trying to set this out, but the config hassle is further reducing the project database already in the MySQL (AMPPS) to be also used by MySQL80 (Workbench) for laternative @Remedy

This solution works perfect! thanks!

@cnivesh009
Copy link

cnivesh009 commented Sep 3, 2020

@sadiqsonalkar

in my case, everthing is working but the only thing is i cant see ampps admin or home option.

option 1: type on your address bar http://localhost/ampps/
http://localhost/ampps-admin/

option 2:
Ampps home button

@nosrat-nosha
Copy link

Hello,
I,m also facing the same problem. I also install it
32Bit: Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)
http://www.microsoft.com/en-us/download/details.aspx?id=8328
Still, my Apache and PHP are not running. What should I do now. I am new in this sector.

@CompleteCommenter
Copy link

CompleteCommenter commented Mar 8, 2021 via email

@sadiqsonalkar
Copy link

Thanks a lot, sir.

@MA82F
Copy link

MA82F commented Aug 3, 2022

i have this problem who can help me?
Screenshot 2022-08-03 100323

@tuankietckc
Copy link

Thanks, Perfect

@dioufi797
Copy link

image
Qui peut m’aider svp mysql s’arrête après 20 secondes

@eliegamala
Copy link

does anyone have an updated solution for this, 2024. non of these solutions provided are working for me

@Ezyweb-uk
Copy link

What works for me is to go to the Ampps > mysql > data folder and delete the log and bin files (files like 'ib_logfile0' and mysql-bin.000001) and then restart MySql in the Ampps app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment