Moze podopne sie tutaj ....
Zainstalowalem Slackware 12 z apache, php, mysql. Za Apache+php nie mialem nigdy problemow dziala. Jednak nie potrafie skonfigurowac mysql. I takie pytanie co nalezy ustawic po swiezej instalaci w mysql ?
Robilem wg tego opisu
Kod: Zaznacz cały
Now, it's time to configure MySQL 5.
Check your /etc/passwd and look for an antry called "mysql". If you don't have it, copy it from the new passwd.new and past it on the current /etc/passwd. Then change the password:
# passwd mysql
I suggest to do this, because MySql runs as mysql user. Now install the databases :
$ su mysql
$ mysql_install_db
$ su root
# cd /etc/
# mv my-small. cnf my cnf
(Check the file or you medium or larg examples) Then:
# cd /etc/rc.d
# chmod + x rc.mysqld
# ./etc/rc.d/rc.mysqld start
If everything ran, you have MySQL running. You could verify it running :
$ mysql -u root -p localhost
If MyS complains about passwords, don't worry. Let's solve it. First stop the MySQL server, and start it by hand :
# cd /etc/rc.d/
# ./rc.mysqld stop
# cd /usr/bin/
# ./mysqld_safe --user=mysql --pid-file=/var/run/mysql/mysql.pid
/--skip-grant-tables &
The latest wrote is to stop MySQL and start it by hand, to setup a new password.
Now run:
$ mysql -u root mysql
And inside the shell of MySql:
update user set password = password ('newpassword') where User =' root' and
host =' localhost';
flush privileges;
Done, now stop MySql and start it from its /etc/rc.d script :
$ kill -9% 1
In the tty where you ran it with the &, or they do kill -9 pid seeking for it with ps aux | grep mysqld.
Now:
$ su root
# cd /etc/rc.d/
# ./rc.mysqld start
And all is ready. Now enter to the shell typing :
$ mysql - u root -p newpassword
And you should get the shell of MySql. If you got some error or warning, check the permissions of the MySql directory :
$ ls -l | grep mysql
drwxr-x--- 6 mysql 27 312 2007-06-24 14:57 mysql/
If there is another user owning the directory and files, as root run :
$ su root
# chown -R mysql: mysql /var/lib/mysql/
Now you have MySQL 5, PHP 5, and Apache 2 up and running. If you _don't_ want them to run everytime you login on the system, disable them with:
# chmod -x rc.httpd / or / and
# chmod -x rc.mysqld
Of course as root and from the /etc/rc.d/ directory. I do thanks Patrick Volkerding about this new applications included, because many of us _need_ Apache 2 and PHP 5, and it was difficult to compile them, because some libraries in Slackware. Now Slackware 12 rc1 includes it as default.
Again, a very good work of Patrick Volkerding and it's crew, in Slackware 12 rc1. It includes state-of-the-art stuff, and it's still very stable, robust and enjoyable. It's ready for server and desktop usage. Good work guys!.
Jednak teraz po ustawieniu tego wszysatkiegio gdy wpisuje
np. mysql -u root -p mojehaslo
prosi mnie znowu o haslo jak je wpisuje to wyskakuje
unknown database: moje haslo
Nie wiem juz mnie slabi to
pomoze ktos ?