LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-26-2005, 12:51 PM   #16
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62

I am logged in as user mysql and it shows only one database "test" and not "mysql".

By the way, how do i assign password for default root account in mysql?
 
Old 06-26-2005, 12:56 PM   #17
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Try logging into mysql as root -- this should show the mysql table.
The easiest way to administer mysql is via phpMyAdmin
(phpmyadmin.net)
 
Old 06-26-2005, 12:57 PM   #18
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
You can assign a password using the mysqladmin utilities.
The command is: mysqladmin -u root password "your password"

As mrdarby said, you should see it when logged in as root.
 
Old 06-26-2005, 01:04 PM   #19
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
thanks guys for replying so fast...i really appreciate your help. I'll try phpmyadmin. I tried logging as root with

#mysql

& it gives me this error
Code:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
Excuse me for my ignorance...

Tux
 
Old 06-26-2005, 01:06 PM   #20
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
to login to mysql as root if root password is not enabled:
Code:
mysql -u root
or
Code:
mysql -u root -p
if password is enabled.

*EDIT*
after -p press enter and you'll get a prompt to type the password.
Code:
mysql -u root -p <something>
DOES NOT MEAN login as user "root" and with password "<something>". It means login as user "root" into database "something" and you'll still get a prompt to type a password. I mention this because it's a really common mistake people do.

Last edited by perfect_circle; 06-26-2005 at 01:17 PM.
 
Old 06-26-2005, 01:12 PM   #21
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
When someone tells you login as root in mysql, it means login as the mysql root user. Not as the root system user.
If you don't specify a user with -u in the mysql command mysql will use your system username as a mysql username but you don't need to become root, in order to login to mysql as mysql root user.
 
Old 06-26-2005, 01:17 PM   #22
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
no luck. Even with mysql -u root, it just gives the same error that i mentioned above.
 
Old 06-26-2005, 01:21 PM   #23
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
Originally posted by tuxrules
no luck. Even with mysql -u root, it just gives the same error that i mentioned above.
read my previous posts.
If you have enabled a password, try
Code:
mysql -u root -p
 
Old 06-26-2005, 01:33 PM   #24
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
thanks for your patience man!!! I got it working...thanks once again.

I'll come back here if i get more errors or i get stumped.

Tux,
 
Old 06-26-2005, 01:44 PM   #25
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally posted by shilo
The man pages may have the correct information. The file /etc/rc.d/rc.mysql is where most people get their information, I believe. To save you the trouble of looking, here's an excerpt that may help: [snip]
Why not put something like this at the start of the data base install script:
Code:
## Verify that we aare running as "mysql" in the "mysql" group
myname="$(id -un)"
mygroup="$(id -gn)"
if [ "${myname}" != "mysql" -o "${mygroup}" != "mysql" ]
then
    echo This script \($0\) can only be run by
    echo user \\'mysql\\' in group \\'mysql\\'.
    echo
    echo You are user \\'${myname}\\' in group \\'${mygroup}\\'.
    echo
    echo To run this script do this, as root:
    echo
    echo \# su - mysql
    echo \# $0
    echo
    echo Note that step one is becoming the mysql user. It\\'s important to do this
    echo before making any changes to the database, or mysqld won\\'t be able to write
    echo to it later \(this can be fixed with \\'chown -R mysql.mysql /var/lib/mysql\\'\).
    echo
    echo Aborting.
    exit 1
fi
This seems like a rather simple thing to do, and would save a lot of questions.
 
Old 06-26-2005, 02:02 PM   #26
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
I think that' s a really good idea.
 
Old 06-30-2005, 07:37 PM   #27
elf
LQ Newbie
 
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 12

Rep: Reputation: 0
Code:
050226  2:24:30  Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
Every time I try to run
Code:
/usr/bin/mysqld_safe &
Code:
mysql@turd:/usr$ ls -l /var/lib/mysql
total 20576
-rw-rw----  1 mysql mysql    25088 2005-02-24 11:15 ib_arch_log_0000000000
-rw-rw----  1 mysql mysql  5242880 1999-04-06 18:37 ib_logfile0
-rw-rw----  1 mysql mysql  5242880 2005-02-24 11:15 ib_logfile1
-rw-rw----  1 mysql mysql 10485760 1999-04-04 20:04 ibdata1
-rw-rw----  1 mysql mysql     2363 1999-04-06 19:01 innodb.status.2562
drwx------  2 mysql mysql     4096 1999-04-06 18:30 mysql
drwx------  2 mysql mysql     4096 1999-04-06 18:30 test
-rw-rw----  1 mysql mysql    15065 1999-04-06 18:59 turd.err
It seems like its not installed correctly (even though it installed with slackware). Do I need to create that file?

Please, any ideas?
elf
 
Old 06-30-2005, 07:54 PM   #28
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Very weird, the host (it consists of three files, host.MYD, host.MYI and host.frm) table should be inside that mysql directory that's listed there. Check if it exists, if it doesn't run mysql_install_db again with the mysql user. To do that run as root:

su - mysql
mysql_install_db
exit

If the table exists, check it's permissions, it should be owned by mysql user and mysql group and have read-write permission for user and group too.
 
Old 06-30-2005, 08:10 PM   #29
elf
LQ Newbie
 
Registered: Mar 2005
Distribution: Slackware 10.1
Posts: 12

Rep: Reputation: 0
it exists at /var/lib/mysql/mysql

I'm still a linux so it will take me a bit to figure out how to chmod it all right.

should they be 755?

edit:??
Code:
chown -R mysql.mysql /var/lib/mysql/mysql

Last edited by elf; 06-30-2005 at 08:36 PM.
 
Old 06-30-2005, 08:27 PM   #30
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
They look OK to me.
DO not start mysql with
/usr/bin/mysqld_safe &
try:
Code:
. /etc/rc.d/rc.mysqld start
instead

Last edited by perfect_circle; 06-30-2005 at 08:32 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting MySQL OLD Error : imeout error occurred trying to start MySQL Daemon Fr33B5D Linux - Software 9 10-28-2006 06:23 AM
Help starting up mysql . rullman Linux - Software 4 05-24-2004 05:00 AM
Starting up MySQL bwreath Linux - Software 2 01-20-2004 03:20 PM
starting mysql apax Linux - Newbie 4 12-28-2003 07:50 AM
starting mysql studentforever Linux - Software 10 09-18-2003 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration