LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-08-2012, 11:02 AM   #1
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Rep: Reputation: 28
MySQL initial databases needed


I'm trying to get MySQL set up on a Buffalo LinkStation NAS box. It has a Debian variant I think.

MySQL is installed, but until I started trying to set it up it had never been started. I'm not having much luck.

I tried mysql_install_db. The only databases I got were information_schema and test. I suspect 'mysql' should be there too.

I cannot even change root's password.

How do I set up the initial database? I have yet to try uninstall and reinstall.

Thanks
Jim
 
Old 02-08-2012, 12:40 PM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
There is no initial database in mySQL as such...the database is part of the package in use. In that case, the package needs to set up the base, you may need to look into the manual for this...or install the database of the package. In some cases (this is the way I install databases) there is an SQL script to run inside mySQL...

The root's password is not set initially, however, but, this easy howto should get that sorted out...

Luck

Thor
 
Old 02-08-2012, 02:09 PM   #3
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 38
I follow these steps on Linux variants (and Macs) that may not have a nice and easy create db inits when I install MySQL server:

* mysql_install_db
*<mysql_install>/bin/mysqld_safe &
*mysql -u root
from mysql cli:
grant all privileges on *.* to 'root'@'localhost' identified by 'root_password';

These work for me but I would not rely only on this if you're setting it up for a production instance. There's a few more things to consider for that. This should get you up and running.

</H>
 
Old 02-09-2012, 07:24 AM   #4
CollieJim
Member
 
Registered: Mar 2005
Distribution: Gentoo, Kubuntu
Posts: 582

Original Poster
Rep: Reputation: 28
Thor, this is what I get:
Code:
root@Nas:~# mysqladmin -u root password 'sometext'; 
mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'
root@Nas:~#
The mysql_install_db script wants to create tables named db, host, user, func, tables_priv and about 13 more. None of these show up after it is run. Surely MySQL must have its own database to keep track of administrative stuff.

This is the current state of things after trying various things including those suggested above. Endless 'permission denied', 'access denied', or missing privilege. I cannot create a user or change password.
Code:
mysql> show databases;  
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| test               | 
+--------------------+
2 rows in set (0.00 sec)

mysql> use information_schema;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+---------------------------------------+
| Tables_in_information_schema          |
+---------------------------------------+
| CHARACTER_SETS                        | 
| COLLATIONS                            | 
| COLLATION_CHARACTER_SET_APPLICABILITY | 
| COLUMNS                               | 
| COLUMN_PRIVILEGES                     | 
| KEY_COLUMN_USAGE                      | 
| ROUTINES                              | 
| SCHEMATA                              | 
| SCHEMA_PRIVILEGES                     | 
| STATISTICS                            | 
| TABLES                                | 
| TABLE_CONSTRAINTS                     | 
| TABLE_PRIVILEGES                      | 
| TRIGGERS                              | 
| USER_PRIVILEGES                       | 
| VIEWS                                 | 
+---------------------------------------+
16 rows in set (0.00 sec)

mysql> select * from USER_PRIVILEGES;
+----------------+---------------+----------------+--------------+
| GRANTEE        | TABLE_CATALOG | PRIVILEGE_TYPE | IS_GRANTABLE |
+----------------+---------------+----------------+--------------+
| ''@'localhost' | NULL          | USAGE          | NO           | 
+----------------+---------------+----------------+--------------+
1 row in set (0.00 sec)

mysql>
 
Old 02-09-2012, 09:12 AM   #5
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Mayne the tutorial at howtoforge (did help me...forgot about it or I would have posted it sooner) can help...
 
Old 02-09-2012, 02:53 PM   #6
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Rep: Reputation: 23
I would get rid of the 'test' database, run mysql_secure_installation would be good if it is a public facing server.

Plus, it gets rid of the anonymous users as well.
 
  


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
Databases/ MySQL... spoovy General 9 04-26-2010 12:43 AM
LXer: How To Back Up MySQL Databases Without Interrupting MySQL LXer Syndicated Linux News 0 05-14-2007 09:16 AM
List databases in MySQL vital_101 Linux - Server 2 11-08-2006 06:26 PM
restoring mysql databases? and mysql permissions... armegeden Linux - Software 0 03-13-2003 11:04 AM
mysql databases k3v0 Linux - Software 2 12-03-2002 07:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:16 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