WAMP Mysql - [1045] access denied for user - php

First of all I want to say I'm completely new to working with client/server architecture, beginner at using the command line, and have never fixed a program before. I downloaded MySql 5.6 for Windows 7 64 bit along with the MySql workbench.
So everything was working fine at first with logging in, databases working, sql queries, etc. What I wanted to do next was use php to access my database from a webpage. So I Installed Wampserver (which includes Apache, phpmyadmin, and I guess an Api for using mysql with php?) and afterwards I was not able to get into my server at all.
But, it's possible it's not because of installing Wampserver, because I did not check to see if it worked right after the install. What I did was, after I installed Wampserver, I changed my root password from Mysqlworkbench in order to have a password I could use. So, it must be that I can't connect to the server because (a) I changed the root login password from the workbench, or (b) I installed Wampserver. I have been messing with this for several hours trying different things, and I think the problem is probably with the files. From what I understand, if you want to log in to the server, it first authenticates your info by comparing it with another file? I think I probably have a problem with the my.ini file that I've seen mentioned.
This is usually what happens when I try to connect
owner>mysql -u root -p
Enter password: ********
Error 1045 (28000): Access denied for user 'root'#'localhost' (using password:YES)
I'll list some of the things that I've tried already. One thing was that I probably need to reset the password, but I already tried doing that using the command line using the
owner>mysql> SET PASSWORD FOR 'root'#'localhost' = PASSWORD('pass123'); FLUSH PRIVILEGES;
Btw, I'm not sure if you're supposed to type the '>' manually because I had to type that '>' sign after mysql for that change password statement to work.
I tried that with the mysql service turned on. Then i tried again with mysql service turned off, but still gives same error that access is denied.
So I tried another suggestion after googling. I turned off the mysql service, went to Workbench, clicked on my root instance and then it gets me into the database. So then it tells me to try starting server from inside there, so I do and it starts, but then prompts me for password. The message log from workbench is:
2016-04-15 18:20:46 - Workbench will use cmd shell commands to start/stop this instance
2016-04-15 18:20:50 - Starting server...
FROM OWNER-PC.err:
2016-04-15 18:20:52 51636 Note Plugin 'FEDERATED' is disabled.
2016-04-15 18:20:52 c84c 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.
2016-04-15 18:20:52 51636 Note InnoDB: Using atomics to ref count buffer pool pages
2016-04-15 18:20:52 51636 Note InnoDB: The InnoDB memory heap is disabled
2016-04-15 18:20:52 51636 Note InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-04-15 18:20:52 51636 Note InnoDB: Memory barrier is not used
2016-04-15 18:20:52 51636 Note InnoDB: Compressed tables use zlib 1.2.3
2016-04-15 18:20:52 51636 Note InnoDB: Not using CPU crc32 instructions
2016-04-15 18:20:52 51636 Note InnoDB: Initializing buffer pool, size = 269.0M
2016-04-15 18:20:52 51636 Note InnoDB: Completed initialization of buffer pool
2016-04-15 18:20:52 51636 Note InnoDB: Highest supported file format is Barracuda.
2016-04-15 18:20:52 51636 Note InnoDB: 128 rollback segment(s) are active.
2016-04-15 18:20:52 51636 Note InnoDB: Waiting for purge to start
2016-04-15 18:20:52 51636 Note InnoDB: 5.6.28 started; log sequence number 10175537
2016-04-15 18:20:52 51636 Note Server hostname (bind-address): '*'; port: 3306
2016-04-15 18:20:52 51636 Note IPv6 is available.
2016-04-15 18:20:52 51636 Note - '::' resolves to '::';
2016-04-15 18:20:52 51636 Note Server socket created on IP: '::'.
2016-04-15 18:20:52 51636 Note Event Scheduler: Loaded 0 events
2016-04-15 18:20:52 51636 Note C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe: ready for connections.
Version: '5.6.28-log' socket: '' port: 3306 MySQL Community Server (GPL)
2016-04-15 18:21:14 - Server start done.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I believe the point of starting the server from workbench was for me to be able to access the users and privileges but says I cannot do that without a connection to server. So, I'm at a loss could be something simple, maybe my syntax for changing pass is wrong, maybe a files messed up, maybe wampserver changed something.
Its worth noting that inside of wampserver files C:\wamp\bin\mysql\mysql5.6.17\bin is alot of the same .exe files that are in C:\Program Files\MySQL\MySQL Server 5.6\bin

So I was googling around but nothing I tried quite worked. So I went on Youtube, and there I found my answer. I will post the link here Youtube password video since it's easier than just explaining, though I will give a short summary. It was done with command line and making a .txt file named "mysql-init.txt". So I had to make a .txt file that contained a command to use mysql and update the mysql.user table, and update the password, then flush privileges. Then had to turn the mysql server service off. After that, I moved the "my.ini" file into the folder of the mysql server ("MySQL Server 5.6" for me). Then ,using the command prompt, went into the mysql server directory. And then I did this:
C:\Program Files\MySQL\MySQL Server 5.6>bin\mysqld.exe --defaults-file="my.ini" --init-file="C:\\Users\\Johnny\\Desktop\\mysql-init.txt" --console
After that, I just restarted the mysql server service, and the new password worked.
I'm using windows 7, it's probably different for other operating systems. There are a few things to note about the video though. He's using a different version of Mysql, so the name of the service for his mysql server is just mysql, but for me with mysql 5.6 installed, the name of the service is mysql56. Also, in the video, he has "my.ini" in the directory of his server, but for me, it was not there. After reading the comments, the "my.ini" file was in a hidden folder, so I unhid the folders (very easy) and found the "my.ini" and placed it in the "MySQL Server 5.6" folder.
Also, in the video he types a very sneaky space that will cause some people problems if they are not paying close attention. It is: --defaults-file="my.ini"SPACE--init-file="........." Another thing, make sure you are in the actual directory, because even if you have mysqld.exe on the system path, it didn't work with me, I had to be in the actual directory as in the video.

Related

Wamp server not starting in windows 10

I have just installed a wamp server after my windows 10 upgrade. And the issue I am facing is not being diagnosed. When I "start the services", the Wamp icon becomes orange and it says 1 of 2 services running. I have changed the port to 8080, I even changed the port of MySQL to 3307. The apache error and access logs, and PHP error log are totally blank. MySQL log is:
2016-04-28T07:54:26.164625Z 0 [Warning] InnoDB: Resizing redo log from 2*3072 to 2*320 pages, LSN=2471251
2016-04-28T07:54:26.275792Z 0 [Warning] InnoDB: Starting to delete and rewrite log files.
2016-04-28T07:54:26.355323Z 0 [Warning] InnoDB: New log files created, LSN=2471251
I recommend you please install recommended .netframeworks for Microsoft after complete installation restart your system and it will work i am sharing the link for Network Frameworks. Please visit: https://www.microsoft.com/en-pk/download/details.aspx?id=49982

MySQL not starting in MAMP PRO

Right, so i've been playing with MAMP and use it to mess around with wordpress plugins and themes. However, I've been forced to keep MAMP running at all times because the moment I restart the server (after the first install of MAMP), mySql doesnt start. It works immediately after reinstalling MAMP, but anytime I stop it, it simply gives me an error. The exact error log is:
150812 10:31:33 mysqld_safe Starting mysqld daemon with databases
from /Library/Application Support/appsolute/MAMP PRO/db/mysql 150812
10:31:33 [Warning] Setting lower_case_table_names=2 because file
system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/
is case insensitive 150812 10:31:33 [Note] Plugin 'FEDERATED' is
disabled. /Applications/MAMP/Library/bin/mysqld: Table 'mysql.plugin'
doesn't exist 150812 10:31:33 [ERROR] Can't open the mysql.plugin
table. Please run mysql_upgrade to create it. 150812 10:31:33 InnoDB:
The InnoDB memory heap is disabled 150812 10:31:33 InnoDB: Mutexes
and rw_locks use GCC atomic builtins 150812 10:31:33 InnoDB:
Compressed tables use zlib 1.2.3 150812 10:31:33 InnoDB: Initializing
buffer pool, size = 128.0M 150812 10:31:33 InnoDB: Completed
initialization of buffer pool 150812 10:31:33 InnoDB: highest
supported file format is Barracuda. 150812 10:31:33 InnoDB: Waiting
for the background threads to start 150812 10:31:34 InnoDB: 5.5.42
started; log sequence number 346953327 150812 10:31:34 [ERROR] Fatal
error: Can't open and lock privilege tables: Table 'mysql.host'
doesn't exist 150812 10:31:34 mysqld_safe mysqld from pid file
/Applications/MAMP/tmp/mysql/mysql.pid ended
I've literally tried everything from killing all mysql processes, to changing port numbers, to restarting both MAMP and the Computer... Nothing seems to work. I even changed the file permission of host.frm to allow all users read&write access.
I have spent hours and hours looking to no avail :( Any suggestions would be HUGELY appreciated!
Thank you!
Shayne

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. The default port number of
apache server is 80. Accidentally Skype uses the same port number as
the apache server. And maybe the default port number 3306 used by
mysql server is also being used by some other application. In my
case it was the wampp server which also has mysql server inbuilt
into it.
1. Changing the Apache servers port number.
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
(Ur
installation directory may as well be different). In there theres a
CONF file/configuration file named httpd.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.). You will find them
at #Listen 12.34.56.78:12 Listen 12 and ServerName localhost: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.
2.Changing the port number for MySql server
Now do the same thiong for Mysql server. It is located in
C:\xampp\mysql\bin
named "my"(select and right click
to view properties. Its an ini file). 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).
3.Starting the Apache server and testing it
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. 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. And I think you
will be good to go. If u have any further problems, feel free to
ask....

MySQL Daemon Failed to Start - centos 6

EDIT: Look at the checkmarked answer comments to get your issue solved.
Whenever I try to start the SQLD service I get MySQL Daemon Failed to Start. I infact tried to "start" the service by doing the following:
service mysqld start
Also
When I type: mysql
I get:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I know that there should be a mysql.sock file in that directory, so I create one. But the file just auto removes its self and I continue to get the error 2002.
I am also unable to log into PHPMyAdmin due to the error. I can access phpmyadmin page but when logging in I get: #2002 Cannot log in to the MySQL server
EDIT:
Here is my mysql.log file:
131201 13:05:07 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
131201 13:18:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131201 13:18:18 [Note] Plugin 'FEDERATED' is disabled.
/usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
131201 13:18:18 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
131201 13:18:18 InnoDB: The InnoDB memory heap is disabled
131201 13:18:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131201 13:18:18 InnoDB: Compressed tables use zlib 1.2.3
131201 13:18:18 InnoDB: Using Linux native AIO
131201 13:18:18 InnoDB: Initializing buffer pool, size = 128.0M
131201 13:18:18 InnoDB: Completed initialization of buffer pool
131201 13:18:18 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
131201 13:18:18 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
I ran mysql_upgrade and got
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed
Try restarting apache sudo service httpd restart. Worked for me.
The most likely cause for this error is that your mysql server is not running. When you type in mysql you are executing mysql client.
Try:
# sudo service mysql start
# mysql
Update (after OP included log in the question; taken from the comments below):
Thanks, saw your log. The log is saying the mysql user doesn't have
proper access rights. I'm assuming your mysql user is mysql(this can
be verified in /etc/my.cnf, execute
chown -R mysql:mysql /var/lib/mysql
and try starting mysqld again.
run this :
chown -R mysql:mysql /var/lib/mysql
and try again!
You may need free up some space from root (/) partition. Stop mysql process by:
/etc/init.d/mysql stop
Delete an unused database from mySql by command:
rm -rf [Database-Directory]
Execute it in /var/lib/mysql. Now if you run df -h, you may confused by still full space. For removing the unused database 's directory to be affected, you need to kill processes are using current directory/partition.
Stopping mysql_safe or mysqld_safe and then mysqld:
ps -A
Then find mysql's process number (e.g. 2234). Then execute:
kill 2234
Now start again mysql:
/etc/init.d/mysql start
/etc/init.d/mysqld stop
mysqld_safe --skip-grant-tables & mysql_upgrade
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
Yet another tip that worked for me. Run the command:
$ mysql_install_db
/etc/init.d/mysql stop
chown -R mysql:mysql /var/lib/mysql
mysql_install_db
/etc/init.d/mysql start
All this rescued my MySQL server!
try
netstat -a -t -n | grep 3306
to see any one listening to the 3306 port
then kill it
I was having this problem for 2 days. Trying out the solutions posted on forums I accidentally ran into a situation where my log was getting this error
check that you do not already have another mysqld process
I had the same issue happening. When I checked the error.log I found that my disk was full.
Use:
df -h
on the command line. it will tell you how much space you have left. mine was full. found my error.log file was 4.77GB. I downloaded it and then deleted it.
Then I used service mysqld start and it worked.
If you are using yum in AIM Linux Amazon EC2.
For security, make a backup complete of directory /var/lib/mysql
sudo yum reinstall -y mysql55-server
sudo service mysqld start
Your database was shut down because of insufficient memory!
You can edit the file my.cnf base below graph to resolve it
performance_schema_max_table_instances=200
table_definition_cache=200
table_open_cache=128
For those who will be here in the future, if all above methods are not working, check the my.cnf file by:
$ sudo gedit /etc/my.cnf
Find the line start with:
bind-address=[an-IP-address]
Check if the IP address after the equal sign is correct. If you don't even know what the IP is, just use localhost, then you can only connect to MySQL inside the same host.
If you want to connect to MySQL remotely, you should actually comment out that line entirely, then it will listen on all IPs and ports which you need because you will be connecting remotely to it over public IPv4.
After that add a user to access your database such as:
mysql> GRANT ALL ON database_name.* TO user#xx.xxx.xx.xx IDENTIFIED BY 'your_password';
Replace xx.xx.xx.xx with your local IP address of your laptop/desktop or if it is dynamic you can add them either by:
'192.168.0.%' as a dynamic C-class or
'%' if you want to be able to connect from anywhere (this is less secure)
Also, if there's a firewall installed, one should open the port on the firewall;
For example in Ubuntu:
sudo ufw allow 3306/tcp
sudo service ufw restart
Now, check if the service is startable by:
$ sudo service mysqld start
I just had this error. I could not connect remotely to my mysql server. I tried restarting mysql server with service mysqld restart (I used root). It stopped but did not start again. Turns out my memory was full. Cleared out a few GBs and it is working fine.
It may be a permission issue,
Please try the following command /etc/init.d/mysqld start as root user.
Reference here 2.10.2.1 Troubleshooting Problems Starting the MySQL Server.
1.Find the data directory ,it was configured in my.cnf.
[mysqld]
datadir=/var/lib/mysql
2. Check the err file,it log the error message about why mysql server start failed. the name of err file is related with your hostname.
cd /var/lib/mysql
ll
tail (hostname).err
3.If you find some messages like :
InnoDB: Error: log file ./ib_logfile0 is of different size 0 33554432 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
170513 14:25:22 [ERROR] Plugin 'InnoDB' init function returned error.
170513 14:25:22 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170513 14:25:22 [ERROR] Unknown/unsupported storage engine: InnoDB
170513 14:25:22 [ERROR] Aborting
then
delete ib_logfile0 and ib_logfile1
, then,
/etc/init.d/mysqld start
RE: MySQL Daemon Failed to Start - centos 6 / RHEL 6
Yum Install MySQL
/etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
Review The log: /var/log/mysqld.log
You might get this error: [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Solution that works for me is running this:
$ mysql_install_db
Please let me know if this won't solve your issue.
what helped me was to add the following lines to /etc/my.cnf
innodb_force_recovery=4
and then sudo service mysqld start
worked like charm

Wamp Error:#2002. I do not have access to myphpadmin. [duplicate]

What could be the problem of my MySQL database server in WAMP.
I can't open it. The error says:
MySQL said: Documentation
#2002 - No connection could be made because the target machine actively refused it.
The server is not responding (or the local server's socket is not correctly configured).
I checked the ports, but no other apps are using port 3306 which is dedicated to mysqld.
Here's what mysql.log says:
120728 22:34:40 [Note] Plugin 'FEDERATED' is disabled.
120728 22:34:42 InnoDB: The InnoDB memory heap is disabled
120728 22:34:42 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120728 22:34:42 InnoDB: Compressed tables use zlib 1.2.3
120728 22:34:43 InnoDB: Initializing buffer pool, size = 128.0M
120728 22:34:43 InnoDB: Completed initialization of buffer pool
120728 22:34:44 InnoDB: highest supported file format is Barracuda.
120728 22:34:52 InnoDB: Waiting for the background threads to start
120728 22:34:53 InnoDB: 1.1.8 started; log sequence number 74876578
wampmysqld: File '.\mysql-bin.000025' not found (Errcode: 2)
120728 22:34:53 [ERROR] Failed to open log (file '.\mysql-bin.000025', errno 2)
120728 22:34:53 [ERROR] Could not open log file
120728 22:34:53 [ERROR] Can't init tc log
120728 22:34:53 [ERROR] Aborting
120728 22:34:53 InnoDB: Starting shutdown...
120728 22:34:53 InnoDB: Shutdown completed; log sequence number 74876578
120728 22:34:53 [Note] wampmysqld: Shutdown complete
120728 22:35:16 [Note] Plugin 'FEDERATED' is disabled.
120728 22:35:16 InnoDB: The InnoDB memory heap is disabled
120728 22:35:16 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120728 22:35:16 InnoDB: Compressed tables use zlib 1.2.3
120728 22:35:16 InnoDB: Initializing buffer pool, size = 128.0M
120728 22:35:16 InnoDB: Completed initialization of buffer pool
120728 22:35:16 InnoDB: highest supported file format is Barracuda.
120728 22:35:32 InnoDB: Waiting for the background threads to start
120728 22:35:33 InnoDB: 1.1.8 started; log sequence number 74876578
wampmysqld: File '.\mysql-bin.000025' not found (Errcode: 2)
120728 22:35:33 [ERROR] Failed to open log (file '.\mysql-bin.000025', errno 2)
120728 22:35:33 [ERROR] Could not open log file
120728 22:35:33 [ERROR] Can't init tc log
120728 22:35:33 [ERROR] Aborting
120728 22:35:33 InnoDB: Starting shutdown...
120728 22:35:34 InnoDB: Shutdown completed; log sequence number 74876578
120728 22:35:34 [Note] wampmysqld: Shutdown complete
120728 22:35:42 [Note] Plugin 'FEDERATED' is disabled.
120728 22:35:42 InnoDB: The InnoDB memory heap is disabled
120728 22:35:42 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120728 22:35:42 InnoDB: Compressed tables use zlib 1.2.3
120728 22:35:42 InnoDB: Initializing buffer pool, size = 128.0M
120728 22:35:42 InnoDB: Completed initialization of buffer pool
120728 22:35:44 InnoDB: highest supported file format is Barracuda.
120728 22:35:59 InnoDB: Waiting for the background threads to start
120728 22:36:00 InnoDB: 1.1.8 started; log sequence number 74876578
wampmysqld: File '.\mysql-bin.000025' not found (Errcode: 2)
120728 22:36:00 [ERROR] Failed to open log (file '.\mysql-bin.000025', errno 2)
120728 22:36:00 [ERROR] Could not open log file
120728 22:36:00 [ERROR] Can't init tc log
120728 22:36:00 [ERROR] Aborting
120728 22:36:00 InnoDB: Starting shutdown...
120728 22:36:01 InnoDB: Shutdown completed; log sequence number 74876578
120728 22:36:01 [Note] wampmysqld: Shutdown complete
PS: I don't have a Skype. So I think it's not the conflict.
This works:
Stop the MySQL service
Open data folder
Remove both ib_logfile0 and ib_logfile1
Restart the service
Go to your MySQL directory and find mysql-bin.index then clear its content. Everything should work fine after that.
Source
I experienced this problem this morning for the first time while using mysql/easyphp. I tried clearing the contents of mysql-bin.index but that didn't work for me.
I restarted the computer and tried accessing mysql again and had no more issues.
I stopped mysql by
sudo service mysql stop
and then started lampp using:
sudo /opt/lampp/lampp start
And everything works fine
I had similar error. Disconnect from internet, access phpmyadmin, then reconnect internet. This solved my problem.
I found that there are some temporary log files are created in the windows temp directory. If the log file limit has exceeded and there is no more space available from windows to write in that log file, it fires an error of access denied.
Clear files from the temp directory can solve it.
In windows 7, follow the process.
Run >> type %temp% and hit enter >> Select all files and delete >>
Restart WAMP and access PHPMyAdmin.
I am also facing this issue, But disabling firewall resolved this.
But any other approach to solve it ? I dont think that this would be a good solution to run mysql. but till then we can use mysql by disabling firewall.
Maybe mysql is not configured to accept remote connections?
try the following:
Open your my.cnf (/etc/mysql/my.cnf usually) and change the line that says
bind = 127.0.0.1
(If present) to your network ip.
Restart mysqld after that change.
I copied my mysql files (the whole directory structure), from one unix computer to another unix computer. Even though the mysql server was completely off, when I made the copy, I could not get it to start up on the 2nd computer.
I had an error "File ./mysql-bin.000532 not found Errorcode: 2"
Since I had the whole thing backed up, I could afford to delete pieces without any impact. In other words, I can't make it any more DEAD. And I can restore any file I trashed.
From digging on the internet, I found that if I remove ib_logfile0 and ib_logfile1, mysql will attempt to recreate them from scratch. This seemed to move it along. However, it still asked for and failed to find that mysql-bin.000532. In THIS forum I see that file mysql-bin.index is just a text file holding onto all of these mysql-bin.####### files. Emptying it means I will not be looking for missing files. Great. Now it comes up fine.
But think about it. There is a reason for those files I am sure. It is holding onto changes to data. What if you had changes that were not actually dropped to disk? You would lose them. As I said at the start, this is a copy of mysql with it completely OFF. So all of MY changes are in. So I am good to go.
Last thing, I am sure this is covered in some mysql documentation somewhere. I just have not found it yet. My actions were based on guesses and experimentation.
I had the same problem, and I tried all previous suggestions, above.
Finally the problem for me, was related to the hosts file, something I had previously added trying to solve another related issue.
I have been through the exact same situation. Read loads of blog and posts. So far my understanding is that it happens mostly because of permission issues. Ubuntu/Linux deals directory access and their permissions very strictly.
Find out where is mysql directory is, then give it proper access right n permission. refresh you localhost/phpmyadmin it should be working now.
In my case I did following according this blog:
sudo chown -R mysql.mysql /opt/lampp/var/mysql
Please notice here that in the blog it says mysql directory in /var/lib/mysql
But actually directory in my machine was /opt/lampp/var/mysql
So directories can differ. Therefore, point out right directory and give it proper access. It should be working fine after unless there isn't any hidden error attached to it.
I'm assuming you faced the issue possibly because of a recent update of the database.
If that's the case, please simply do the following three steps:
Disconnect from your internet.
Access your MySQL offline as usual.
Once you have logged in MySQL, you can reconnect to the Internet.
I installed MySQL stand-alone (not using any XAMPP/WAMP stack) and got this problem some time ago. I just ran the following command in windows command prompt:
C:\>"C:\mysql\bin\mysqld" --console
where "C:\mysql\" is the installation directory (adjust the path according to your own case). The
--console
displays the process for debugging purposes.
After startup, you should see something like:
C:\mysql\bin\mysqld: ready for connections
Version: '5.7.10' socket: '' port: 3306
For moore, see Starting MySQL Server
These step worked for me:
Open services
Stop MySQL[version] service
Open MySQL properties
If you did a manual install of MySQL (ie not using xampp wamp etc.) then you may want to change startup type to automatic
Go to the log in tab
Select local system account
Press ok
Start the service again
MySQL57 properties screenshot:
I'm having the same problem with Wampserver. It’s worked for me:
You must change this file: "C:\wamp\bin\mysql[mysql_version]\my.ini"
For example: "C:\wamp\bin\mysql[mysql5.6.12]\my.ini"
And change default port 3306 to 80. (Lines 20 & 27, in both)
port = 3306
To
port = 80
When I turned off my McAfee Firewall the problem was fixed
What I need to change in McAfee settings
Firewall -> Settings -> Program Permissions -> Apache HTTP Server -> need to be set to Full or Outgoing
Sometimes you might have multiple webservers running i.e. apache2 and nginx concurrently on same location but different ports. I suggest stopping apache2 or nginx and then restarting the one you prefer before deleting any files.
You can solve this problem by rebooting your system.
In Ubuntu you can use:
reboot
What I did, is:
Uninstall Wamp
Delete the Wamp folder from C
Reinstall Wamp again.

Categories