Page 1 of 1

MySQL music db

Posted: 21 Mar 2010, 20:51
by dedanna1029
I'm wondering if anyone knows a simple way to create a music db in MySQL? This would be for Amarok2, which at this point is crashing all over the place on me anyway... sigh.

Thanks.

Re: MySQL music db

Posted: 21 Mar 2010, 21:50
by dedanna1029
Not being mysql-literate, I am wondering what i'm doing wrong:

Code: Select all

# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> set password for root@localhost = password xxxxxxx
    -> flush privileges;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xxxxxxx
flush privileges' at line 1
mysql> quit;
Bye
[root@dedanna dedanna]# mysql -p -u root
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Thanks.

Re: MySQL music db

Posted: 21 Mar 2010, 22:21
by viking60
Ah You have trouble with speaking with Mysql if I read this right. It should be no problem to create a music.db You might want to use phpmyadmin for that.

You want to set the root user for mysql (It has nothing to do with your Linux root). Here is a way to do it:

Code: Select all

/usr/bin/mysql_secure_installation


NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):

The first time you hit enter here without typing anything.
You will then be prompted to set a password - do so and yoy can safely answer the rest of the prompts with "yes".



Since you have installed a lot already it might be a good idea to remove the old config files

Code: Select all

rm -f /var/lib/mysql/mysql/*

And install mysql from scratch. That way you do not drag old configs that you do not remember anymore with you.

Re: MySQL music db

Posted: 22 Mar 2010, 01:26
by dedanna1029
I will certainly save that for future use, thank you. :) Ah, but isn't that for an rpm-based distribution?

I say future use, because the drive that I installed Arch to just died on me. :(

I have another drive that I can use to reinstall, but all my time's been taken this weekend; need to get ready to go back to work tomorrow. :\

Re: MySQL music db

Posted: 22 Mar 2010, 02:01
by viking60
Computer life can be frustrating. ;) And yes those are rpm commands. Just the habit I guess (I have edited it). :oops: Remove the config files before reinstalling is my point.

Re: MySQL music db

Posted: 22 Mar 2010, 03:17
by dedanna1029
Okay, got it. Thanks! :)