Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

(solved) maria db problems

Message
Author
Be OK
Forum Novice
Forum  Novice
Posts: 21
Joined: Thu Aug 17, 2017 7:00 am

(solved) maria db problems

#1 Post by Be OK » Fri Jun 08, 2018 2:21 pm

Using mx packet installer i installed mariadb server metapack . One problem is din`t ask for root password.
So following this link " https://www.digitalocean.com/community/ ... t-password "
I try the commands . sudo systemctl stop mariadb give Failed to get D-Bus connection: Unknown error -1
sudo mysqld_safe --skip-grant-tables --skip-networking & give $ 180608 20:19:47 mysqld_safe Logging to syslog.
180608 20:19:47 mysqld_safe A mysqld process already exists

So how to solve this ?
Last edited by Be OK on Sun Jun 10, 2018 9:07 am, edited 3 times in total.

User avatar
fehlix
Forum Regular
Forum Regular
Posts: 597
Joined: Wed Apr 11, 2018 5:09 pm

Re: maria db problems

#2 Post by fehlix » Fri Jun 08, 2018 2:49 pm

Be OK wrote:
Fri Jun 08, 2018 2:21 pm
...
So how to solve this ?
You might try one of those:

Code: Select all

# sudo service mysql help
Usage: /etc/init.d/mysql start|stop|restart|reload|force-reload|status|bootstrap
E.g. mariaDB status after install looks like this:

Code: Select all

# sudo service mysql status
[info] /usr/bin/mysqladmin  Ver 9.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu on x86_64
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Server version		10.1.26-MariaDB-0+deb9u1
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/var/run/mysqld/mysqld.sock
Uptime:			2 min 47 sec

Threads: 1  Questions: 471  Slow queries: 0  Opens: 198  Flush tables: 2  Open tables: 27  Queries per second avg: 2.820.
:puppy:
--fehlix

Be OK
Forum Novice
Forum  Novice
Posts: 21
Joined: Thu Aug 17, 2017 7:00 am

Re: maria db problems

#3 Post by Be OK » Sat Jun 09, 2018 4:24 am

Ok that commands work " [info] /usr/bin/mysqladmin Ver 9.1 Distrib 10.0.32-MariaDB "
Got any books that work as printed ? Got "getting started with mariadb" but that does not work,like "sudo mysql -u root "give ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) :bawling: :(
Still no idea how to set user root pasword :bagoverhead:

User avatar
fehlix
Forum Regular
Forum Regular
Posts: 597
Joined: Wed Apr 11, 2018 5:09 pm

Re: maria db problems

#4 Post by fehlix » Sat Jun 09, 2018 8:31 am

Be OK wrote:
Sat Jun 09, 2018 4:24 am
... how to set user root pasword
Try this: set a new mysql-root-password

Code: Select all

# sudo mysqladmin -u root password “change_my_root_password_here” 
EDIT: better restart mysql-db :

Code: Select all

# sudo service mysql restart
Connect to mysql with mysql-root user:

Code: Select all

# sudo mysql -u root -p

Be OK
Forum Novice
Forum  Novice
Posts: 21
Joined: Thu Aug 17, 2017 7:00 am

Re: maria db problems

#5 Post by Be OK » Sat Jun 09, 2018 11:30 am

Sadly $

Code: Select all

 sudo mysqladmin -u root password mxlinux  

Code: Select all

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
No not work , i forgot using mx 16.
Last edited by Be OK on Sat Jun 09, 2018 12:02 pm, edited 2 times in total.

User avatar
fehlix
Forum Regular
Forum Regular
Posts: 597
Joined: Wed Apr 11, 2018 5:09 pm

Re: maria db problems

#6 Post by fehlix » Sat Jun 09, 2018 11:45 am

Please provide outputs within the [code][/code]-tags. Presse above "</>" - icon
for better readability.

Be OK
Forum Novice
Forum  Novice
Posts: 21
Joined: Thu Aug 17, 2017 7:00 am

Re: maria db problems

#7 Post by Be OK » Sat Jun 09, 2018 12:03 pm

Hope this is what you mean.

User avatar
fehlix
Forum Regular
Forum Regular
Posts: 597
Joined: Wed Apr 11, 2018 5:09 pm

Re: maria db problems

#8 Post by fehlix » Sat Jun 09, 2018 1:06 pm

Be OK wrote:
Sat Jun 09, 2018 12:03 pm
Hope this is what you mean.
Yes, it*s much more better to read.

Let's try again. I'm on MX17.1.
Better restart mysql first:

Code: Select all

$ sudo service mysql restart
[ ok ] Stopping MariaDB database server: mysqld.
[ ok ] Starting MariaDB database server: mysqld.
Now try this instead to give mysql-root a password:
If you have not yet changed the default empty
mysql-root password, you might just press enter
and than retype the new password twice.

Code: Select all

fehlix@mx171:~/Desktop
$ sudo mysqladmin -u root -p password
Enter password: 
New password: 
Confirm new password: 
Now connect to mysql/mariadb:

Code: Select all

$ sudo mysql -u root -p 
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 34
Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

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

Be OK
Forum Novice
Forum  Novice
Posts: 21
Joined: Thu Aug 17, 2017 7:00 am

Re: maria db problems

#9 Post by Be OK » Sat Jun 09, 2018 1:17 pm

First fehlix thanks for your time, the restart worked.

Code: Select all

sudo mysqladmin -u root -p password       Enter password:    
resulted in

Code: Select all

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

User avatar
fehlix
Forum Regular
Forum Regular
Posts: 597
Joined: Wed Apr 11, 2018 5:09 pm

Re: maria db problems

#10 Post by fehlix » Sat Jun 09, 2018 4:50 pm

Just re-done this on MX16.1:
Purge existing maria-db

Code: Select all

# sudo apt-get purge mariadb*
Reinstall mariadb do this from the terminal command-line
First always do update and upgrade:
Update package-list

Code: Select all

# sudo apt-get update 
upgrade packages:

Code: Select all

# sudo apt-get dist-upgrade
Now reinstall mariadb:

Code: Select all

# sudo apt-get install mariadb-server
You will get asked to set a new mariadb-root password. Please enter a new password
You shoud now connect as normal linux-user (no sudo needed)

Code: Select all

mysql --user=root --password

Code: Select all

mysqladmin --user=root --password
$ mysql --user=root --password
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 53
Server version: 10.0.32-MariaDB-0+deb8u1 (Debian)

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]>

Post Reply

Return to “Software / Configuration”