Error Connecting To Database Access Denied For User
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more
Error Connecting To Database Access Denied For User 'zabbix'@'localhost'
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users error connecting to database access denied for user zabbix localhost using password yes Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping
Error Connecting To Database Access Denied For User Root Localhost Using Password Yes
each other. Join them; it only takes a minute: Sign up “Connect failed: Access denied for user 'root'@'localhost' (using password: YES)” from php function up vote 33 down vote favorite 13 I wrote some function used by a php database connection failed access denied for user webpage, in order to interact with a mysql database. When I test them on my server I get this error: "Connect failed: Access denied for user 'root'@'localhost' (using password: YES)" I am able to use them on my pc (using XAMPP) and I can navigate through the tables of the database using the command line in the server. Instead, the webpage fails to connect. I've checked the password but with no results, it's correct (otherwise I could database connection failed due to access denied for user not log in to mysql from the command line). The call of the function is the following: $conn = new mysqli("localhost", "root", "password", "shop"); Have I to set something in my server? Thanks Edit: PHP version 5.3.3-7+squeeze1 mysql version: 5.1.49-3 both on debian php mysql access-denied share|improve this question edited Jun 22 '11 at 23:21 asked Jun 22 '11 at 18:49 fbrundu 1,96694476 migrated from superuser.com Jun 22 '11 at 20:11 This question came from our site for computer enthusiasts and power users. 1 What version of PHP are you running? What version of MySQL? It sounds similar to bitshop.com/Blogs/tabid/95/EntryId/67/… –Jack Murdoch Jun 22 '11 at 20:16 add a comment| 8 Answers 8 active oldest votes up vote 48 down vote accepted I solved in this way: I logged in with root username mysql -u root -p -h localhost I created a new user with CREATE USER 'francesco'@'localhost' IDENTIFIED BY 'some_pass'; then I created the database CREATE DATABASE shop; I granted privileges for new user for this database GRANT ALL PRIVILEGES ON shop.* TO 'francesco'@'localhost'; Then I logged out root and logged in new user quit; mysql -u francesco -p -h localhost I rebuilt my database using a script source shop.sql; And that's it.. Now from php works without problems with the call $conn = new mysqli("localhost", "francesco", "some_pass", "shop"); Thanks to all for your time :) share|i
& Albums Members List Search Forums Show Threads Show Posts Tag Search Advanced Search Go to Page... Page 1 of 5 1 23 > Last » Thread Tools
Movable Type Connection Error Access Denied For User
Display Modes #1 02-10-2012, 04:37 jsantiago Member Join Date: May access denied for user 'root'@'localhost' (using password yes) when trying to connect 2012 Posts: 38 Zabbix server is not running: Hi experts, I was finally able to complete the installation of
Mysql Access Denied For User 'root'@'localhost' (using Password Yes)
Zabbix 2.0.2 on CentOS. However, "Zabbix server is not running: the information displayed may not be current." message is on the dashboard. I did the following: 1. Changes the SELinux to http://stackoverflow.com/questions/6445917/connect-failed-access-denied-for-user-rootlocalhost-using-password-yes permissive (learned from zabbix forum). 2. Checked the config files if correct password is used on the database, which is correct (learned from zabbix forum) Still have the same issue after doing the steps above. Hope to hear from you soon. Thank you. Attached Images jsantiago View Public Profile Send a private message to jsantiago Find all posts by jsantiago #2 https://www.zabbix.com/forum/showthread.php?t=32326&page=2 03-10-2012, 22:18 luis_josue Junior Member Join Date: Oct 2012 Posts: 13 oye amigo....encontraste solucion??? yo estoy igual como practicante y pues estoy con que no corre ni nada....si encontraste solucion me mandas a mi correo: luis-power-23@hotmail.com....se te agradece de antemano. luis_josue View Public Profile Send a private message to luis_josue Find all posts by luis_josue #3 04-10-2012, 00:51 jsantiago Member Join Date: May 2012 Posts: 38 Hi Luis, Sadly, we have the same problem I guess. Once I have the solution, I'll post it here. Good luck. jsantiago View Public Profile Send a private message to jsantiago Find all posts by jsantiago #4 04-10-2012, 10:56 badener Member Join Date: Sep 2009 Location: Germany, Baden-Baden Posts: 42 zabbix.conf.php Hi, the message shown does not refer to the database but to the actual server. Check in zabbix.conf.php $ZBX_SERVER and $ZBX_SERVER_PORT Make sure that port on the given server is your Zabbix Server and can be reached from the frontend server. Good luck badener View Public Profile Send a private message to badener Find all posts by badener #5 04-10-2012, 12:38 j
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring http://superuser.com/questions/603026/mysql-how-to-fix-access-denied-for-user-rootlocalhost developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top mysql how to fix Access denied for user 'root'@'localhost' up vote 52 down vote favorite 31 Before access denied I screw up something, when login using $ mysql -u root -p, and show databases: +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | game_data | | test | +--------------------+ Then I try to create a new user and notice something is wrong with the PRIVILEGES. So I deleted the new users, and I guess I removed the 'root' and 'Admin' accidentally. Then I try to create 'root' again, but get Access denied error access denied for when doing grant all privileges. mysql> CREATE USER 'root'@'localhost' IDENTIFIED BY 'password'; mysql> grant all privileges on *.* to 'root'@'localhost' identified by 'password' with grant option; ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) If I login mysql again using $ mysql -u root -p, and show databases, +--------------------+ | Database | +--------------------+ | information_schema | +--------------------+ All the other databases are gone. How do I fix mysql now? I cannot cannot find the database 'mysql', cannot create database, create user, anything I try to do will get an error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES). Should I reinstall mysql using macports? If reinstall, I will lost the database 'game_data', right? mysql user-accounts login privileges share|improve this question edited Dec 31 '15 at 11:36 Eric Leschinski 2,71542642 asked Jun 3 '13 at 7:32 Vogelsire 363146 migrated from stackoverflow.com Jun 3 '13 at 8:32 This question came from our site for professional and enthusiast programmers. Try accesing the server with 'root'@'127.0.0.1' which is diferent from 'root'@'localhost'. Then issue a command to create the user 'root'@'localhost' and grant all privileges to it. –Gimmy Jun 3 '13 at 8:06 Also see How to have MySQL entitle the root user? on Super User. It attempts to avoid resetting passwords. –jww Apr 2 at 11:28 add a comment| 5 Answers 5 active oldest votes up vote 73 down vote ac