[Discuss] mysql/mariadb

John Abreau abreauj at gmail.com
Mon Jun 26 21:55:32 EDT 2017


OK, I gave it a try and it didn't work.

The following got it working. FYI, mysql --version shows

    mysql  Ver 15.1 Distrib 10.1.21-MariaDB, for Linux (x86_64) using
EditLine wrapper

sudo systemctl stop mariadb
sudo mysqld_safe &
mysql -u root
    set password for 'root'@'localhost' = password('EXAMPLE') ;
    \q
sudo kill $( sudo cat /var/run/mariadb/mariadb.pid )
sudo systemctl start mariadb



On Mon, Jun 26, 2017 at 12:21 PM, dan moylan <jdm at moylan.us> wrote:

>
> john abreau writes:
> > On Sun, Jun 25, 2017 at 3:53 PM, dan moylan <jdm at moylan.us> wrote:
>
> >> running on an intel nuc pentium
> >>
> >> moylan ~[263] uname -a
> >> Linux arcturus 4.11.6-201.fc25.x86_64 #1 SMP Tue Jun 20 20:21:11
> >> UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> >>
> >> root ~[144] mysql -u root -p
> >> Enter password:
> >> ERROR 1045 (28000): Access denied for user 'root'@'localhost'
> >> (using password: YES)
> >>
> >> i've googled for this problem and found no solutions.  i may
> >> remember incorrectly, but i don't believe this has been a
> >> problem in the past.
> >>
> >> any suggestions as to how to set the root password and get
> >> the mysql prompt?
>
> > Here's what a google search turned up:
>
> > https://www.digitalocean.com/community/tutorials/how-to-
> reset-your-mysql-or-mariadb-root-password
>
> went there .....
>
> root mysql[792] mysql --version
> mysql  Ver 15.1 Distrib 10.1.24-MariaDB, for Linux (x86_64) using readline
> 5.1
>
> MariaDB [(none)]> ALTER USER 'root'@'localhost' IDENTIFIED BY
> 'xxxxxxxxxx';
> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
> that corresponds to your MariaDB server version for the right syntax to use
> near 'USER 'root'@'localhost' IDENTIFIED BY 'xxxxxxxxxx'' at line 1
>
> (ok -- can't see any typos, we try the alternative)
>
> MariaDB [(none)]> UPDATE mysql.user SET authentication_string =
> PASSWORD('xxxxxxxxxx') WHERE User = 'root' AND Host = 'localhost';
> Query OK, 0 rows affected (0.08 sec)
> Rows matched: 1  Changed: 0  Warnings: 0
>
> (looks ok)
>
> MariaDB [(none)]> FLUSH PRIVILEGES;
> Query OK, 0 rows affected (0.00 sec)
>
> MariaDB [(none)]> quit
> Bye
>
> (now we kill it)
>
> root ~[193] pseo mariadb
> 18731    27 Sl   11:20 /usr/libexec/mysqld --basedir=/usr
> --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin
> --user=mysql --skip-grant-tables --skip-networking
> --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid
> --socket=/var/lib/mysql/mysql.sock
> root ~[194] kill 18737
> root ~[195] pseo mariadb
> [1]+  Done                    mysqld_safe --skip-grant-tables
> --skip-networking
>
> (and restart)
>
> root ~[196] systemctl start mariadb
> root ~[197] mysql
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> password: YES)
> root ~[198] mysql -u root -p
> Enter password:
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> password: YES)
>
> getting very discouraged.
>
> ole dan
>
> j. daniel moylan
> 84 harvard ave
> brookline, ma 02446-6202
> 617-777-0207 (cel)
> jdm at moylan.us
> www.moylan.us
> [no html pls]
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://lists.blu.org/mailman/listinfo/discuss
>



-- 
John Abreau / Executive Director, Boston Linux & Unix
Email: abreauj at gmail.com / WWW http://www.abreau.net / PGP-Key-ID 0x920063C6
PGP-Key-Fingerprint A5AD 6BE1 FEFE 8E4F 5C23  C2D0 E885 E17C 9200 63C6



More information about the Discuss mailing list