mysql setup issue

Wade Smart wadesmart at gmail.com
Thu Aug 23 21:24:16 UTC 2018


-- 
Registered Linux User: #480675
Registered Linux Machine: #408606
Linux since June 2005

On Thu, Aug 23, 2018 at 3:58 PM Colin Law <clanlaw at gmail.com> wrote:
>
> On Thu, 23 Aug 2018 at 21:17, Wade Smart <wadesmart at gmail.com> wrote:
> >
> > I installed mysql on my new system (18.04). Ive followed the
> > steps to install but at no point have I been able to access mysql
> > to set the password. Im run into one of two errors:
> >
> > ERROR 1698 (28000): Access denied for user 'root'@'localhost'
> > or
> > ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> > '/var/run/mysqld/mysqld.sock' (2)
> >
> > when following this:
> >
> > Set mysql root password
> > Before accessing the database by console you need to type:
> > $ mysql -u root
> >
> > At the mysql console type:
> > $ mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
> > ...
>
> This is the technique I found
> sudo -i
> mysql
> alter user 'root'@'localhost' identified by 'thepassword';
> bye
> exit
>
> Colin

Thanks Colin.



More information about the ubuntu-users mailing list