Problem starting up mySQL - mysql

I just downloaded PHP and I tried running mySQL with the command:
C:\Program Files\EasyPHP-5.3.2i\mySQL\bin\mysql.exe
And I got the error:
ERROR 1045 (28000): Acess denied for user 'ODBC'#localhost' (using password: YES)
I found a solution online with linux, but I'm running vista on this machine and have no clue what all of that meant. Please help, I'm tired of using the school's terminals.

It means one of three likely things.
you need to either create a new user in mysql with the password you are using
set the password of the "ODBC" user to what you are using
grant permission to the host you are attempting to connect from, in this case localhost
Without more information to your specific setup it will be very difficult to answer with more accuracy.

Have you tried supplying the username to the command, for example:
C:\Program Files\EasyPHP-5.3.2i\mySQL\bin\mysql.exe -u root
?

Check the manual Connecting to and Disconnecting from the Server

Related

On Windows 10; ERROR 1045 (28000): Access denied for user 'personalUser'#'localhost' (using password: NO)

I have installed Xampp on windows 10 to create a simple app to understand how to use Laravel. I have the last version of Xampp. I configure PHP correctly (with path and so on), but I have a problem with MySQL.
I put the MySQL bin folder address in the user variables path (section in the system properties). In this way, my prompt command recognizes the mysql command. The problem arrives when I write this command: mysql -v. I tried a lot of things, but this Error remains:
ERROR 1045 (28000): Access denied for user 'personalUser'#'localhost' (using password: NO)
PS: personalUser is a generic name to indicate the name of my user.
I have tried to substitute the MariaDB with MySQL in the Xampp folder (I don't know why Xampp has the MariaDB version instead of MySQL). I redownload Xampp twice times. In the xampp folder, in the phpMyAdmin folder, in the file config.inc.php, I changed this command line:
$cfg['Servers'][$i]['password'] = ''; with $cfg['Servers'][$i]['password'] = 'NO';
I tried other things.
Based on the error message you are receiving, it seems that the issue is related to the authentication credentials for the MySQL server. The error message indicates that the user 'personalUser' is not allowed to access the MySQL server because they are not using a password.
To fix this issue, you can try the following steps:
Open the MySQL command-line client by running the mysql command in your terminal or command prompt.
When prompted for a password, enter the password for the user 'personalUser'.
If you do not know the password, you may need to reset it by following the steps in this MySQL documentation: https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
Once you have successfully authenticated with the MySQL server, you can use the GRANT command to grant the 'personalUser' user access to the database you want to use. For example, to grant access to the 'mydatabase' database, you can use the following command:
GRANT ALL PRIVILEGES ON mydatabase.* TO 'personalUser'#'localhost';
After granting the appropriate privileges to the user, you should be able to access the MySQL server and use it with Laravel.
If you continue to have issues, you may need to check the configuration of the MySQL server to make sure that it is set up to allow access from the user 'personalUser'. You can refer to the MySQL documentation for more information on how to configure user access: https://dev.mysql.com/doc/refman/8.0/en/adding-users.html

ERROR 1045 (28000): Access denied for user 'root'#'localhost' (USING PASSWORD = NO) issue Freeradius server causing aborted connexion

Hi I'm trying to get a mariadb/freeradius/daloradius server up but i keep getting this log from systemctl -xe on my mariadb/mysql service, i came across that after figuring it was the sql connection that was problematic, freeradius shows me the same :
I'm getting frustrated, i ran across almost every config file, all should be in order but no this keeps happening, the radius server is trying to connect to my root sql user when i pointed to him in his config file that he should use the one i created especially for him and i can't manage to understand why, do mariadb needs the root credentials before even allowing it to connect to it ? I'm clueless please help.
This message tell you. that either the credentials in your config is not ok or that root user is not authorized to login.
Best practice is to take your mysql config and try to connect with the mysql command:
mysql -h yourconfigurationhost -u yourconfiguration user -p yourconfiguration password yourconfigurationdatabase
Be shure doing this with your application user.

Unable to connect to MySQL instance after installing

I'm setting up a MySQL database following this tutorial. I installed it and successfully initialized an instance with a root password, but I am having trouble connecting to the instance via command line. When I click on the 'mysql' executable under bin, I get this message
ERROR 1045 (28000): Access denied for user 'hunter'#'localhost' (using password: NO)
and if I try to enter
> mysql -u root -p
in the terminal I get this message
-bash: mysql: Permission denied
It says in the instructions that I should be getting prompted to enter the password for the database, but for some reason it won't let me.
I would suggest first off to try a mysql workbench. You can download it at https://dev.mysql.com/downloads/workbench/ .
It seems that calling mysql from bash is causing issues for you. If you are using a *Nix environment, it could be a permissions issue and you need to set the correct permissions on the mysql binary. However, usually a correct installation should have already done that. See: https://askubuntu.com/questions/229589/how-to-make-a-file-e-g-a-sh-script-executable-so-it-can-be-run-from-a-termi
Secondly, you should use the username root . hunter is not default username.
From the mysql documentation:
How to Reset the Root Password
If you have never assigned a root password for MySQL, the server does not require a password at all for connecting as root. However, this is insecure. For instructions on assigning a password, see Section 2.10.4, “Securing the Initial MySQL Account”.
Reference:
https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html

Access denied for user 'root'#'localhost' (using password: YES) EVEN when the Password works on PhpMyAdmin

I have an issue with accessing MySQL using root and password.
I am trying to connect the Server using PuTTY SSH using
> mysql u root -p
For an unknown reason I can NOT access the Database and I am getting rejected with the following ERROR:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
The weird thing is that I am using the same password with PhpMyAdmin using Web and I can access everything. I need to run a script that will allow the SQL server
root#localhost user
run the query over the LAN and not the web.
Therefore I need the user to connect using command line SSH or something like that.
How can I fix that issue? the user rott and password WORKS just fine through PhpMyAdmin and not through SSH PuTTY, Why?
Is there something I need to do in order to fix this? I have been working with the Database for 2 years now using the web interface. Now I need to have it working using SSH (22).
Please assist.
thanks in advance.
Arye
It sounds like you need to update the your password for root on MySQL.
Check here: MySQL - ERROR 1045 - Access denied
Thank you all for your help. I have managed to overcome the issue: (see below)
That was FIXED Only when I changed from old password to new. in my.cnf file I have removed the flag for old_password=1 and Restart the service of MySQL.
Then I have created a NEW password (using the old one I had) and it was created with 41 (NEW) Hash length and not 16 (OLD)..
Then I did flush privileges as you recommended - and IT WORKS.
Thank You!
> mysql -h your_host_name -P your_port_number -u your_user_name -p
try with hostname option it should work!
Ubuntu 18.04 running MySQL 5.7.28 creates a file /etc/mysql/debian.cnf. It contains some credentials and other settings. So, this debian-sys-maint user is by default a root equivalent. It is used by certain maintenance scripts on Debian systems, and as a side-effect, allows users with root access on the box to view the plaintext password in /etc/mysql/debian.cnf. If your SSH using a client fails after a fresh install through root try using the credentials set in this file.

Can connect from PHP but not from Linux Redhat console

I'm trying to get access to my mysql DB from linux RedHat console. All the tome I'm getting:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES).
Obviously it seems that the root password is incorrect, but it isn't, because I can connect without no problems from the Website. All the PHP configuration files from several installed frameworks are using the same configuration parameters.
I'm using the following to connect from console:
mysql -u root -p
When the console prompts the password I can't get access.
Any idea?
Thank you very much in advance.
Jordi
Did you try resetting the password for root#localhost? Might be fastest way to solve this.
check if php connects from the same machine/ip and if mysql binds address 0.0.0.0.
dev.mysql.com/doc/refman/5.1/en/… : For example, if you bind to 0.0.0.0, you can connect to the server using all existing accounts. But if you bind to 127.0.0.1, the server accepts connections only on that address. In this case, first make sure that the 'root'#'127.0.0.1' account is present in the mysql.user table so that you can still