You are not logged in.

#1 2014-08-11 22:23:39

cars10
Member
Registered: 2014-03-11
Posts: 27

[solved] mariadb/mysql broken

hey guys, i think that i really fu**** shit up this time.
heres the story:

While working in mysql-workbench i noticed some default databases. think they were named mysql, performance-schema, something-schema .
I got the gread idea to delete them because i could not remember creating those - this was before the thought that they might be needed came to my mind.

So of course the connection to mysql did not work now, so i reinstalled mariadb, but this did not recreate the databases.
Somewhere i found the command

mysql_install_db

  which did not work because the script could not be found.

So i came to the awesome idea to uninstall mariadb + mysql-workbench and remove everything related to mysql left on the system.

sudo find / -iname 'mysql'

got me

/etc/mysql
/usr/share/mysql
/usr/lib/mysql
/usr/include/mysql
/var/lib/mysql
/var/lib/mysql/mysql

/usr/data/some mysqlstuff here

i deleted all those + /usr/data because it only contained mysql and mariadb stuff.

Now i reinstalled mariadb (+ libmariadbclient and mariadb-clients), but the following problems occur:

1. i can only start mysqld.service if i am logged in as su, otherwise it says file not found (with and without sudo)
2. i do not have a binary called "mysql" in /usr/bin or anywhere else, so i can't use the mysql interface
3. the mysql_secure_installation script fails :

$- mysql_secure_installation
/usr/bin/mysql_secure_installation: Line 379: find_mysql_client: command not found.

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

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, 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): 
/usr/bin/mysql_secure_installation: Line 207: /usr/bin/mysql: file or directory not found.
OK, successfully used password, moving on...

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

Set root password? [Y/n] n
 ... skipping.

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB 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] 
/usr/bin/mysql_secure_installation: Line 207: /usr/bin/mysql: file or directory not found .
 ... Failed!
Cleaning up...

I expected mariadb to install the mysql binary, but it seems that you have to get this differntly. but how?

I stopped trying and breaking stuff now and hope someone can help me to fix this mess i created.

Thanks!

Last edited by cars10 (2014-08-12 11:51:41)

Offline

#2 2014-08-12 02:15:58

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [solved] mariadb/mysql broken

Are you using pacman to do all this? I'm suspecting not because /usr/bin/mysql is provided by mariadb-clients and /usr/bin/mysqld is provided by mariadb. Clear everything out again, then install from the official repos using pacman. That should at least get you started...

Offline

#3 2014-08-12 10:10:20

cars10
Member
Registered: 2014-03-11
Posts: 27

Re: [solved] mariadb/mysql broken

Of course i use pacman.
I will now try to uininstall everything again,

sudo find / -iname '*mysql*' 

and delete also mysqld and so on, what i did not do in my first attempt.


E: weirdly it works now, thanks. it's not that i did all this before.. Still got the error in the first line when using mysql_secure_installation, but everything works.

Last edited by cars10 (2014-08-12 11:53:15)

Offline

Board footer

Powered by FluxBB