Wamp Server Error #1045 - php

I would like to know about the Wamp server #1045 error on my machine. few days back i had installed my Wamp server and it was working fine like loading PhpMyAdmin, creation of database, localhost etc. i even performed some basic practices in Php.
Later on i learnt to change the password of MySQL via MySQL CMD and i performed the same. After that when i tried to load the PhpMyAdmin again, it showed me error #1045 access denied.
I tried to perform many thing but no respite from the pains. I tried to perform some fixes in phpmyadmin/config.inc, some setting in ctrl panl- Admin tools-Services-mySql (Start and stop)..
May i know what has happened to this and how to solve this problem. Thanks for help in advance.

You are basically giving yourself the answer inside your question.
You changed the mysql password. With which you most probably mean that you changed the mysql root user password. Since phpmyadmin is a mysql GUI (graphic user interface) it is only understandable that phpmyadmin can not function anymore because you haven't told it the new password you set. Just login to phpmyadmin by using 'root' as user and the new password you set. Works?

Related

Unable to login to mysql from php

I recently installed Ubuntu 16.04.1 on a virtual machine ( i had problems with newer versions and Ldap) for testing.
I set up two way ssl authentication for my test website, mysql and phpmyadmin. So far so good.
I am able to loggin to phpmyadmin (i made a user and i can also login) by typing https://localhost/phpmyadmin but whenever i try to connect from a php to the database i get an access denied error for user 'myuser'#'localhost' (also tried with root) (using password yes).
Password and the php file i use to connect is not the problem. I tried them in Xampp on windows and i can connect. What am i doing wrong.
All the fixes i have seen so far are for when you are unable to login to phpmyadmin. But i can login. It's just when i try to use mysqli to connect from php it doesn't
Please share the code your using to connect to the database, from that we would be able to advise.

Login issue in Mysql through Phpmyadmin

I am unable to login to MySQL. I am using Phpmyadmin interface. Please note that it is not #1045 error which has plenty of solutions on the internet including this website. When I try to login it simply shows this error
Cannot log in to the MySQL server
and nothing else no error number or anything else and I'm guessing that my MySQL and PHP server are not starting at all because I also cannot run sites on localhost. I am using WAMP on Windows machine. Please tell me how to solve this problem and I don't want to uninstall and reinstall WAMP because I have not taken backup of all the databases on MySQL and if I uninstall it will delete all the databases. Please help.
Reset your password.
Left click WAMP in your system tray, go to MySQL > MySQL console.
Type the following: SET PASSWORD = PASSWORD('new_password');
For no password: SET PASSWORD = PASSWORD('');
more information here
https://dev.mysql.com/doc/refman/5.6/en/alter-user.html

Get back the access to the database on local server

I've done a mistake and would be really thankful to get help.
I've been using MAMP to create a wordpress website on my computer. Today I've been trying to move in to the actual hosting and I guess I've somehow damaged the database.
The thing is that the default username and password are "root" and i wanted to change that before downloading database from the local server. I did, and after that i couldn't use phpMyAdmin, it suggested me to check config.inc.php. I went to this file and there in the code there were still default "root" username and password.
I changed them to the new ones (the same i used before) and it helped, but only to a certain extention. Now i can use phpMyAdmin, but don't have the rights neither to create a new database, nor to make any changes to the user privileges.
So the question is: how to make it all working as it was working before? :)) Thanks a lot in advance!
The second little question is:
Are there any possibilities to upload and use this messy database to the actual server? Otherwise none of the settings on my website is working and i kinda have to restart making it.
Since you can't do much from within phpMyAdmin, it sounds like you may be logged in as the anonymous user, which happens if you try to log in and don't match an existing username/host. Double-check that the username and host you're logging in as are the ones configured in MySQL. You may need to reset your account. Even though the error message is different (due to the use of the anonymous user), this may be helpful: Fix Access denied for user 'root'#'localhost' for phpMyAdmin
If your auth_type is 'cookie' or 'http' then you don't need to edit config.inc.php with your new login information (since config.inc.php shouldn't have it in at all, the user and password fields are only used with auth_type 'config'), only enter it when prompted at login.

how do i create a username and password for mysql?

Hi i have installed locally xampp php and mysql. Im reading and it says about having a username and a password. I dont login at all, i just press start to both apache and php. How i put a username and password?
I know it might be a silly question but i have googled and i dont understand... how to do it and if i can do it locally.
Thanks!
apache or php do not have credentials, only mysql has. usually with xamp comes phpmyadmin which lets you manage users for mysql, too. In my case, it was preconfigured just to work. user for mysql was root, password blank. Maybe you should change that ;)
Access phpmyadmin via http://localhost/phpmyadmin/
In the directory of phpmyadmin (called phpMyAdmin in your xampp dir) there is a config.inc.php where the username that phpMyAdmin uses is configured. If you change the password via phpMyAdmin you have to edit it here, too.

phpmyadmin install & login headaches

So, I'm adding phpmyadmin to a new server. I don't use it, but my designers do, so this is my first run in with it. I got it up and running without any problems, but I've hit a wall when it comes to logging in to the db.
it works just fine if I set authentication to config, and enter a valid username and password in the config.inc.php file, but as this will be a somewhat open server, I need authentication to be set to cookie. It seems easy enough, but using the exact same user credentials that worked in the config file, every time I try to log in it boots me back to the login screen.
I'm using a mysql db on a remote server, but the user I'm using has the correct access, and I've tested using sequel pro and a bash shell, both connected without any issues.
I can't seem to figure out what's causing this, and I'm not getting any errors back from phppmyadmin.
The server it's on is running php 3.5, and the server it is connecting to is running mysql 5.1, in case that helps.
I understand you are trying to connect to a server different from the one that hosts phpMyAdmin, right?
Looking at the documentation about authentication I see a posible thing to check when using cookie method:
If you want to log in to arbitrary
server see
$cfg['AllowArbitraryServer']
directive.
So, althought it doesn't say so explicity, I understand you need to set that parameter in this case.
When you use "config" authentication type, the user's "username" and "password" are the ones you have chosen in the config file.
When using "cookie" authentication type, phpMyAdmin asks for mysql users, so when logging in to a specific database schema, you should log in in phpMyAdmin with a username/password which has privileges on that db in mysql.
In config.inc.php don't forget to put some random string in $cfg['blowfish_secret'] if you intend to use cookie authentication.

Categories