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
Related
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.
I've installed wampserver. Yet it is always as a red tray icon.
Icon tooltip msg: local server - None of 2 services running.
Port 80 is not occupied; checked with Apache ► Service ► Test port 80:
Warning: chmod(): Permission denied in C:\wamp\scripts\config.inc.php on line 68
Impossible to modify the file C:\WINDOWS\system32\drivers\etc\hosts to be writab
le
The file C:\WINDOWS\system32\drivers\etc\hosts is not writable
***** Test which uses port 80 *****
===== Tested by command netstat filtered on port 80 =====
Test for TCP
Port 80 is not found associated with TCP protocol
Test for TCPv6
Port 80 is not found associated with TCP protocol
===== Tested by attempting to open a socket on port 80 =====
Your port 80 is not actually used.
Apache ► Service administration ► Install Service issues in a cmd window:
pressing Enter shuts the window down, nothing happens. Waiting gives no profit either.
What's wrong?
Update
Had attempts to change port number for Apache (both to 81 and to 8080) in httpd.conf:
Listen 0.0.0.0:8080
Listen [::0]:8080
ServerName localhost:8080
Checked whether IIS is runnig => No!
.
Doesn't help.
I had the same problem, and the solution was too simple:
"Run it as Administrator."
Without changing port or other additional configuration ...
You can do it by right clicking on the program icon and in the menu that appears, select the option "Run as administrator".
It is also possible to automate this process, by right clicking on the program icon and selecting "Properties".
Once the properties window is open, we go to the "Compatibility" tab. In the "Configuration" area we mark the option "Run this program as administrator".
Then we will click on "Apply" and then on "OK".
Ready! From now on, every time we run the program it will do so in administrator mode.
(Today, May 8, 2019, I see that #riggsfolly has responded in a comment much earlier than me. My recognition.)
I had same problem, tried change port and so on, but finally I installed older version (2.5 I think) and it works without any change of setting.
I think that IIS in install your windows
Change your port on httpd.conf
for example 81
Listen 0.0.0.0:80
Listen [::0]:80
ServerName localhost:80
to
Listen 0.0.0.0:81
Listen [::0]:81
ServerName localhost:81
and restart apache service
Open the httpd.exe in administration manually. The file is in wamp64\bin\apache\apache2.4.23\bin\. Then it works.
You can try this
Uninstall the wamp server
Click on the downloaded wamp file , and select Run as Administrator
Read and follow the Information Window that will pop up after one or two steps
Complete the installation
Still ? Check out http://forum.wampserver.com/read.php?2,134915
It can happen because of one of the three reasons:-
1) Missing VC++ installation: Install All versions of VC++ redistribution packages VC9, VC10, VC11, VC13, VC14 and VC15.. If you have a 64-bit Windows, you must install both 32 and 64bit versions of each VisualC++ package, even if you do not use Wampserver 64 bit.
2) You forgot to provide Admin Privileges to WAMP Server : Launch and Install with the "Run as administrator" option, very important.
3) WAMP, IIS and Skype fighting over same port :
Close Skype or force not to use port 80: http://forum.wampserver.com/read.php?2,134915
Disable IIS: http://forum.wampserver.com/read.php?2,134915
I'm working with wamp server 5-6 years. I bought a new laptop with windows 8.1. I installed wamp server and 3-4 about I haven't problem. But today my wamp server not starting. When I was doing my research I could not find anything related to my problem.
I checked and the IIS ins't installed on Windows features
I uninstalled skype ( which using the port 80 )
I re-install 2 times the wamp server and the last install I reinstall also the MS Visual c++ redistributable
I deleted previous the install all files ( the directory c:/wamp )
I checked the "Web Deployment Agent Service i" aren't running
Please not that : I'm not changed anything on my pc... and yet I still have the problem.
Also in windows logs I saw the following errors for apache:
(OS 10013)An attempt was made to access a socket in a way forbidden by
its access permissions. AH00072: make_sock: could not bind to
address [::]:80 ( 2 times )
AH00451: no listening sockets available, shutting down
AH00015: Unable to open log
Any idea or help is very helpful... Thank you for all replies
OK I found the solution. I disabled both the IPv6 and again the SQL Server reporting service and I changed the port again to 80 from 8080 and now it's working. Thanks all you for your helps
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
I am trying to get the MySQL server on MAMP to run, but to no avail.
It was working fine, but I stopped using MAMP when I started using Ruby on Rails. Now I want to work on some older PHP projects that live in my MAMP install and I can't fire them up. Most frustrating.
I suspect it is related to the MySQL gem installed with RoR, but I am unsure as to how I can check or how I would fix the conflict.
My question, essentially, is "how can I start my mySql server?"
Os: 10.7.4
MAMP V: 1.8.4
I have check the logs:
Output of tail mysql_error_log.err -n 100:
==> mysql_error_log.err <==
120715 12:11:41 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
120715 12:11:41 [ERROR] Do you already have another mysqld server running on port: 3306 ?
120715 12:11:41 [ERROR] Aborting
120715 12:11:41 InnoDB: Starting shutdown...
120715 12:11:42 InnoDB: Shutdown completed; log sequence number 0 44233
120715 12:11:42 [Warning] Forcing shutdown of 2 plugins
120715 12:11:42 [Note] /Applications/MAMP/Library/libexec/mysqld: Shutdown complete
120715 12:11:42 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
Update
I have tried to edit the my.cnf of the running instances, as suggested. I dod this my running locate my.cnf to find the files.
that returned two results, one which was in MAMP PRO (which I am not using) and another (based in Macports). I chose to edit lines 15 and 34 of the Macports file.. I then restarted the machine.
It appears I am getting the same error:
==> mysql_error_log.err <==
120715 13:37:26 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
120715 13:37:26 [ERROR] Do you already have another mysqld server running on port: 3306 ?
120715 13:37:26 [ERROR] Aborting
120715 13:37:26 InnoDB: Starting shutdown...
120715 13:37:27 InnoDB: Shutdown completed; log sequence number 0 44233
120715 13:37:27 [Warning] Forcing shutdown of 2 plugins
120715 13:37:27 [Note] /Applications/MAMP/Library/libexec/mysqld: Shutdown complete
120715 13:37:27 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
120715 12:11:41 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
120715 12:11:41 [ERROR] Do you already have another mysqld server running on port: 3306 ?
You already have MySQL or some other program using the port 3306. You can either terminate the existing program or use a different port.
The port can be changed in the MySQL configuration file my.cnf.
I'm on Mac and I installed MySql separate of MAMP, at some point. This version of MySql was blocking MAMP's MySql server.
Open up System Preferences and if you see a MySQL icon on the bottom row, open it up. Here it told me that I had a MySQL server instance running. Stop the server and uncheck "Automatically Start MySQL Server on Startup"
Hope this helps someone!