Posts mit dem Label mysql werden angezeigt. Alle Posts anzeigen
Posts mit dem Label mysql werden angezeigt. Alle Posts anzeigen

Montag, 27. Oktober 2008

Mysql import

mysql -p -u{Benutzername} {DB-Name} < filename

Dienstag, 20. Mai 2008

Setting up mysql

go to the user and groups setting in the gnome system administration menu and set the mysql user password to something that makes sense for you. Then give the mysql user a shell '/bin/bash' (setting in the advanced tab of user and groups) and then close all the windows with ok to set the changes.

Then change to user mysql

useraccount>su - mysql
password:

and enter the mysql password

now you should have the bash promt:

#bash>

then enter

#bash>mysql_install_db

then

#bash>mysqld --skip-grant-tables &

then

#bash>mysql

you should get the mysql promt

mysql>UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';

mysql> FLUSH PRIVILEGES;

############################
############################

now open a new terminal window....

useraccount> pfexec /usr/bin/svcadm enable database/mysql:version_50

this should start the mysql database (pfexec /usr/bin/svcadm disable database/mysql:version_50 stops the database)

if you want mysql to automatically start and stop with powerup and powerdown

then do this (which i have not)

pfexec /usr/sbin/svccfg import /var/svc/manifest/application/database/mysql.xml


Installing Mysql

as a normal user

useraccount>pexec pkg install SUNWmysql5

This installs mysql in /usr/mysql

Then change to su root and change the owner and groups of the files in etc and var as follows.

root>chown -R mysql:mysql /etc/mysql
root>chown -R mysql:mysql /var/mysql

also see docs