mysql problem

Karl Larsen k5di at zianet.com
Sat Apr 26 19:27:01 UTC 2008


Karl Larsen wrote:
> Carl Friis-Hansen wrote:
>   
>> 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.
>>
>>   
>>     
>     Well it sure did work! Here is what happened in a non-root Terminal;
>
> karl at karl-desktop:~$ mysql -hcarl-fh.com -ugps -pgps
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 19387
> Server version: 5.0.45-Debian_1ubuntu3.3-log Debian etch distribution
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql>
>
>     It has kind of a high connection id. But will check it out. I have a 
> db working now and see if this will let me use it.
>
> If you have the time what does all that mean in your call?
>
> Karl
>
>
>   
    The problem with your call is it has no permissions. I tried and 
find this works fine in a non-root terminal:

$ mysql -uroot -psecret

This brings it up with full permissions without being root.

Karl


-- 

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.
   PGP 4208 4D6E 595F 22B9 FF1C  ECB6 4A3C 2C54 FE23 53A7





More information about the ubuntu-users mailing list