MySQL-Setup in a LAMP environment on OpenSuse 11.4

Hello dear Community, good evening

i am running OpenSuse 11.4 with KDE

according to this document i set up the server on my system - see: Webserver Installation unter OpenSUSE 11.4 | mnTechBlog

server installed
server and running!

See the guide for the YAST-Setup: well i did only a straightforward and quick setup witout any Vhost.

Virtual Hosts
linux-ps95 in “/srv/www/htdocs”, SSL deaktiviert

Result; while i type localhost into the browser i get - “it works”

Well - i also set up the mysql-server!

See the setup-protocoll that reports all the way of my configuriation ( according to Webserver Installation unter OpenSUSE 11.4 | mnTechBlog )

Question: Well - i need to know how to use the MySQL-Server, that is on the machine!? Which passwords which access do i have?

See the ** quick walkthrough throughout the installation and configuration-process of the MySQL-Server:**

martin@linux-ps95:~> su
linux-ps95:/home/martin # mysql_secure_installation


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): ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES) Enter current password for root (enter for none): OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables…
… Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
… Success!

Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
… Success!

By default, MySQL comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] n
… skipping.

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
… Success!

Cleaning up…

again… Question: Well - i need to know how to use the MySQL-Server, that is on the machine!? Which passwords which access do i have?

By default you should have automatic MySQL root access (it’s the application, not the same as system root) with full and open (no password) local system permissions (access restricted to logging in from the same machine).

You’ll probably need to crack a book or some documentation to understand the MySQL security model, you’ll want to create database containers and different user accounts with restricted permissions for your application (PHP) to access the specific database container.

If you don’t feel comfortable administering your MySQL entirely from the CLI, you can install MySQL Workbench, MySQL Administrator and MySQL Query as graphical tools (but you’ll still need to know what you’re doing, the tools aren’t too helpful to a newbie).


Hello again

well i also have installed this phpMyadmin - via YAST - now this also runs on my server that runs itself on the openSuse 11.4

But if i go to this page:

http://localhost/phpMyAdmin - i am asked for user-name and password !?

well - does that mean that the MySQL Server allready runs too!? Without extra starting this!?

Well - after all this would be good. Then i would be sure that the MySQL-Server is okay and running without any extra need to take care for it!?

Hmm - but wait; Which passwords should i use here. Where can i get them - i the configuration of what!?

  • of the MySQL or
  • the phpMyadmin-script!?

love to hear from you

That is because phpMyAdmin assumes you have already done which tsu2 advised.

Open a console and log in as root
mysql -u root
without a password. Then
SELECT Host, User FROM mysql.user;
SET PASSWORD FOR ‘root’@‘localhost’ = PASSWORD(‘password’);
Replace HOST_NAME with the HOST NAME that appears when you open a console and the lower case 'password’s with your own.
To delete the anonymous users
DELETE FROM mysql.user WHERE User = ’ ';
You need to FLUSH PRIVILEGES; otherwise, your changes will not take effect until the next time you reboot and so phpMyAdmin will throw up error messages.
Then you can QUIT and start using php MyAdmin with your new root password.