mysql problem

Carl Friis-Hansen ubuntuuser at carl-fh.com
Sat Apr 26 14:40:44 UTC 2008


Hi Karl,
there are some concept issues here
Karl Larsen wrote:
> Carl Friis-Hansen wrote:
>> Karl Larsen wrote:
>>   
>>>>> karl at karl-desktop:~$ mysqladmin -p secret version
>>>>>         
>> Hi, Karl
>> normally you would *never* use sudo for this.
>> Instead tell the cilient what user you want to log in as.
>> In you case:
>> mysql -hlocalhost -uroot -p
>>
>>   
>     Hi Carl, my problem was I thought like you are and I put too much 
> information in the command line. As I understand now, MySQL reads the 
> user name from the terminal and then asked for the password. So I need 
> to be a root user to use that password. I also have another user set up 
> from my normal user "karl" and that works too. You need to let the 
> system know who is calling on localhost. I have no idea how they get it 
> working on Windows :-)
> 
I have supported database systems for a very large software company for 
five years and not one single time needed to be root in order to contact 
a database..
You will always run your sql client as a normal user. The database 
cannot smell what user you are running the sql client as anyway.
In your specific case, you entered a password tor the root user when you 
installed the database system. For security reasons, only local users 
can login to the database. You can later change that. As I said in my 
first reply, a sentence like this would work for you:
karl at karl-desktop:~$ mysql -uroot -p
The -uroot parameter ensures that you login to the database system as 
user root. The -p ensures that you are asked for the password.

you are welcome to try:
mysql -hcarl-fh.com -ugps -pgps
and have some fun.

-- 
+-------------------------------+-------------------+--------+
| Carl Friis-Hansen             | Fiskeryd Nybygget |  \  /  |
| carl.friis-hansen at carl-fh.com | 341 91  Ljungby   |   \/   |
| Phone: +46 372 15033          | Sveden            | ###### |
+-------------------------------+-------------------+--------+





More information about the ubuntu-users mailing list