Re: phpmyadmin #2002 - No such file or directory

From: J.O. Aho <user_at_example.net>
Date: Fri, 15 Jul 2016 08:32:10 +0200
Message-ID: <dureb2F5jajU1_at_mid.individual.net>


On 07/15/16 01:37, Gordon Burditt wrote:
> This belongs in comp.databases.mysql, not comp.lang.php.

Do you know if the OP do subscribe to c.d.m? You at least cross post and in worst case you may set followup-to, but then you tell that, for you still loose major input as people may not always subscribe to the followup-to newsgroup.

>> 1) when I try to log in to phpmyadmin and enter the login name and password,
>> I get two error messages:
>>
>> #1045 - Access denied for user '~Alla'_at_'localhost' (using password: YES)

>
> Does your user name *REALLY* begin with a tilde? Are you sure about
> that? It's apparent that your home directory is *not* /Users/~Alla , so
> where did the tilde come from?
>
>>  mysqli_real_connect(): (HY000/1045): Access denied for user '~Alla'_at_'localhost' (using password: YES)

>
> You may need to re-do the configuration of phpMyAdmin if you gave it
> a username beginning with a tilde to log into MySQL.
>
> Do the environment variables $USER or $LOGNAME have your user name in it
> beginning with a tilde? If so, fix that.
>
>> But mysql server is running, which is indicated in the system preferences. 

>
> If the server says "Access Denied", chances are VERY good it's running.
>
>> 2) mysql start command from the Terminal returns the same error message:
>> ERROR 1045 (28000): Access denied for user 'Alla'_at_'localhost' (using password: NO)

>
> There's no tilde in that one!

No password, add -p to the command line.

> Does your (MySQL) account have a password? Did you supply a password?
> (hint: using password: NO) What do you think is supposed to happen
> when you don't supply a required password? How do you think you
> might fix the problem of not supplying a required password (on
> a shell command line)? If you know how to teach Terminal to use a
> different command line to start MySQL? If so, you might try that.
>
> It is possible (and recommended) to put information in your home
> directory to hand the client utilities ('mysql', 'mysqldump',
> 'mysqladmin', etc.) a default server hostname, username, and password
> by default. A better way appeared in mysql 5.6.6. This involves
> .my.cnf or .mylogin.cnf files in your home directory. This is more
> secure than putting a password on the command line, and permits
> running them in batch shell scripts without being prompted for the
> password a lot. I'm not going to give details here.

Unless the password in the configuration file is encrypted, it do not add any security over using -p (without supplying the password) in the command line, the only way to get hold of the password would be a keylogger when you use -p (without supplying the password).

> I am intentionally not giving click-by-click instructions to do
> this. You need to read some documentation on option files for
> configuring *CLIENT* (not server) programs.
>
>
> You ran the security script to delete anonymous access to MySQL.
> You did at some point create a user Alla, right?
>

-- 

 //Aho
Received on Fri Jul 15 2016 - 08:32:10 CEST

Original text of this message