hey guys i have installed wamp server with mysql and i have one user root without password. but now i want create one another user with password. when i was create user with password and check his connection with mysql_connect() its give me error like this
Access denied for user 'Dest'#'localhost' (using password: YES)
But password is realy correct. what can i do? i was delete this user and create other user but i have the same problem. if anyone knows that problem please help me
Hey Guys Problem Has Been Solved. Problem was that when i was create user i was choose % this local and global hosts but for wamp global accses for sql base is disabled with defoult and i think poblem is that. when i create user with Localhost its worked fine. thanks all for help :)
If you try to connect as root and get the above error, it means that you do not have a row in the user table with a User column value of 'root' and that mysqld cannot resolve the host name for your client:
from the mysql prompt execute this command to be able to change any password
FLUSH PRIVILEGES;
for more information
https://help.ubuntu.com/community/MysqlPasswordReset
Related
I wanted to setup my owncloud installation on my raspberry pi 2. So, I created an mysql database and user.
CREATE DATABASE owncloud;
CREATE USER 'owncloud'#'localhost' IDENTIFIED BY 'Password';
GRANT ALL PRIVILEGES ON owncloud. * TO 'owncloud'#'localhost';
FLUSH PRIVILEGES;
After I type all nessesairy parameters into the webinterface of the owncloud-setup, I recevied:
Error while trying to create admin user: Failed to connect the database: An exeption occured in driver: SQLSTATE[HY000][1045] Access denied for user 'owncloud'#'localhost' (using password:YES)
Sadly, my resent sreach on similar topics didn't result in any functional hint on this problem. So, I would be happy about further suggestions.
Look at this: https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#database-choice
In Terminal: mysql_upgrade --force -u root -p
Use administrative MySQL »root«-user and password with the Installation Wizard
Check that the Database not exist which you create with the Installation Wizard
If nothing helps, start with sqlite, then migrate to mysql like this: https://doc.owncloud.org/server/9.0/admin_manual/configuration_database/db_conversion.html
Just replace localhost for 127.0.0.1 in Owncloud's setup form for MySQL as mentioned in comments above by Askaga
For some reason, explicitly re-access the database from the terminal solves the problem for me. Just give mysql an empty line with
mysql -u root -e ";"
This should be an individual command after you created database and database user.
Sure, you should always check whether
There are users with an empty username. Remove them.
Remove "test" database.
Grant appropriate permission to your database user.
Last but not least FLUSH PRIVILEGES;.
Search other posts for instructions. I'm just providing a possible solution if you come across a situation where none of the above works.
Here's a good example to properly setup mysql after installation. FYI.
Mask the DB password in the installation screen (the password should not be visible, only dots) and retry.
Ubuntu 18.04.1, Owncloud 10.
Check the contents of config.php in my case located at /var/www/owncloud/config/.
Specialy items dbuser and dbpasswrd.
Read config.sample.php in the same directory for info.
Hi all and please help
I have been running XAMPP and PHPMyAdmin for a number of years on my PC. Both have served me well.
This morning I got an warning message basically saying give root a password because it was not secure. I did (or thought I had), but as a result Now all I can view is a database called information_schema.
I initially panicked, but then found that all my other test sites are working ok and I can still access them via their own username and password.
Therefore my question is: Please could anyone tell me how I can grant Global Privileges back on root#localhost? I have tried a number of things all morning but I get greeted either with a Syntax problem or a 1045 error message, saying Access Denied.
I welcome any help or advice. On the bright side, I have a password for root now!
When you change the password on the root userid from within phpMyAdmin, you then have to put that password into the phpMyAdmin config.
So edit \xampp\phpmyadmin\config.inc.php
Find this line
$cfg['Servers'][$i]['password'] = '';
and add the password to it
$cfg['Servers'][$i]['password'] = 'NEW_PASSWORD';
Ok. Sorted. In my case, I discovered that I had another global login and from the User list, I was able to grant global privileges for the root login once again
I'm using IIS with PHP, PHPMyAdmin and mysql. They were installed separately. When mysql was installed, I was given the option to and went ahead with setting a password. I can use phpmyadmin using the same password, but when I test my database connection I receive the error Access denied for user ''#'localhost' (using password: NO).
I've been all over forums and youtube looking for a possible solution but haven't been able to get anywhere. I have disabled my firewall and attempted to allow mysqld through it separately and still no results.
PHPMyAdmin resides in my wwwroot folder for IIS and mysql is in my C:/Progam Files folder. Is this the possible issue or is this set up okay?
Additionally, I've reviewed my config files and all have the same matching password. My user is root and all config files have that as well. PHPMyAdmin accepts that as the user.
What it seams to me is that your phpMyAdmin is not correctly configured. You lack username and password options thus you cannot connect. You should review: http://docs.phpmyadmin.net/en/latest/config.html#basic-settings and look for $cfg['Servers'][$i]['nopassword'] option. It should be disabled.
P.S.: Do you get username/password prompt from phpmyAdmin ?
It looks like you are giving user as username under config.inc.php without any password..
You can either provide the correct password for username user
or
You can provide the same username and password which lets you login to mysql from command prompt..
I installed wamp 2.1 on windows 7. However when i open phpMyAdmin, I get the error, Mysql 'No Provileges'. I uninstalled wamp and reinstalled it a few times, but it doesn't help. Does anyone know how to solve this issue?
Also, when i tried creating a database from mysql console, i am getting the following error:
ERROR 1044 <42000>: Access denied for user ''#'localhost' to database 'a_db_name'
Thank God and to all helped.
Its simple.
Must! click logout icon in phpadmin page
In login page, type:
username:root password: (blank)
surprise. now you can happily create your database.
Are you logging into MySQL as root? You have to explicitly grant privileges to your "regular" MySQL user account while logged in as MySQL root.
First set up a root account for your MySQL database.
In the terminal type:
mysqladmin -u root password 'password'
To log into MySQL, use this:
mysql -u root -p
Edit:
To set the privileges manually start the server with the skip-grant-tables option, open mysql client and manually update the mysql.user table and/or the mysql.db tables. This can be a tedious task though so if what you need is an account with all privs I would do the following.
Start the server with the skip-grant-tables option
Start mysql client (without a username/password)
Issue the command
flush privileges;
which forces the grant tables to be loaded.
Create a new account with the GRANT command something like this (but replacing username and password with whatever you want to use.
GRANT ALL on *.* to 'username'#'localhost' identified by 'password';
Restart the server in normal mode (without skip-grant-tables) and log in with your newly created account.
Refer this MySQL docs.
Take a look at my topic regarding this issue, which takes some of the above.
MAMP mysql broken root user
You need to shutdown your mysql install and restart it from the command line properly like is indicated above. In my topic I have full clear instructions on how to do so. My instructions are for MAMP but you should be able to adapt it for your install.
Simple solution. Just find the icon right to "home" in PhpMyAdmin and click to logout. Then login using username "root" and password ""(blank). This will work accordingly.
username ought to be root and keep the password null(keep the password field blank)
right click on the wamp icon and goto mysql console.
Login with password if you have set any.By default the password is blank and username is 'root'
Once you are in mysql prompt execute
FLUSH PRIVILEGES;
now quit the command prompt and you are good to go.
in step 1 .inter your databasevery important.
in step 2 .select your database via all tables .
in step 3. backup type=replace & export.
in step 4 import database in my sql.
attention please:in import your database...
all table must view & selected in step 4.
I get the error #1045 - Access denied for user 'root'#'localhost' (using password: NO)
after I accidentaly changed the password in phpmyadmin for root and 127.0.0.1 . the problem is i cannot change common.lib.php. I want to revert these changes in mysql somehow... Doe to the security of the server i cannot change much
I hope you can access the mysql server administration. As I know the root is the main user in MySQL it'll be a problem if you cannot access it. If you have a user with the same level, try to change the password there if possible.
Here's the step on how to reset the root password in MySQL
How to Reset the Root Password
I was also dependent in phpmyadmin before until I know sqlyog and MySQL Query Browser and WorkBench. Have a look on this as an alternative on phpmyadmin.
Download MySQL Workbench
SQLyog free download
It's been a while since I've used phpMyAdmin, but if I'm not mistaken, it stores it's passwords in the mysql database it self. So, if you are able to get access to the command-line of the server, you are able to change the password using simple SQL statements.
Go to /etc/phpmyadmin folder.
Open config-db.php
Here you will find your default username and password