MySQL with Ubuntu 12.04
Brian Sorahan
bsorahan at gmail.com
Tue Jul 10 18:22:47 UTC 2012
I just started porting an a MySQL application from Ubuntu Lucid to CentOS
this morning and found the same issues as when I tried to go from Lucid to
Precise:
> ERROR 1045 (28000): Access denied for user 'username'@'localhost' (using
password: YES)
It sounds like this may be a different error than what you're experiencing
(1396), but I thought I would share the workaround I discovered nonetheless.
I had to change my CREATE USER and GRANT statements from
CREATE USER 'username' IDENTIFIED BY 'password';
GRANT ALL ON db_name.* to 'username'@'%';
to
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON db_name.* to 'username'@'localhost';
Hope this helps!
Brian
On Tue, Jul 10, 2012 at 12:40 PM, Stuart Stegall <keltor at keltor.org> wrote:
> Using the mysql command initially and validate with that just to
> validate if the issue is elsewhere.
>
> Go n-éirí leat,
> Stuart
>
>
> On Tue, Jul 10, 2012 at 12:32 PM, Dan Healy <dfhealy at gmail.com> wrote:
> > I ran mysqlcheck and got no results. Thanks for the information. It was
> > worth a try.
> >
> > I am using MySQL 5.5.24 and trying to connect to my database with
> > mysql_pconnect(). That is apparently obsolete and I should be using
> > mysqli_connect(). I will have to research that some more. I will keep
> you
> > posted.
> >
> > Dan H.
> >
> > On Tue, Jul 10, 2012 at 12:03 AM, Stuart Stegall <keltor at keltor.org>
> wrote:
> >>
> >> Try running mysqlcheck against the mysql database.
> >>
> >> Go n-éirí leat,
> >> Stuart
> >>
> >>
> >> On Mon, Jul 9, 2012 at 9:26 PM, Dan Healy <dfhealy at gmail.com> wrote:
> >> > I tried that. The user does not exist. In MySql do the following:
> >> >
> >> > use mysql;
> >> > select user from user;
> >> >
> >> > That gives a list of the users. If I drop the database and flush
> >> > permissions all users created for that database are removed from the
> >> > mysql
> >> > database.
> >> >
> >> > There is something I am missing there. I'm not going to find it
> >> > tonight.
> >> >
> >> > Dan H.
> >> >
> >> > On Mon, Jul 9, 2012 at 8:52 PM, Joshua K <goodtimetribe at gmail.com>
> >> > wrote:
> >> >>
> >> >> If you list the contents of the mySQL table does it show that user
> >> >> exists?
> >> >> If so maybe just comment out that line from the dump back in? If it
> >> >> says the
> >> >> user exists, it probably does.
> >> >>
> >> >> Dan Healy <dfhealy at gmail.com> wrote:
> >> >>
> >> >> >I downloaded a fresh version of 10.04 from Ubuntu, installed, and
> got
> >> >> >the
> >> >> >same results -- it couldn't see my wireless connection or cable
> >> >> >connection
> >> >> >to the internet. 10.04 is not an option.
> >> >> >
> >> >> >I reinstalled 12.04 and very carefully installed lamp-server and
> >> >> >php5-gd
> >> >> >and restarted apache2.
> >> >> >
> >> >> >12.04 sees the wireless connection. The problem is with MySQL.
> >> >> >
> >> >> >I can import my database dump but can't create users. When I try to
> >> >> >create
> >> >> >a user I get a 1396 error indicating the user already exists. He
> >> >> >doesn't.
> >> >> >I have searched on 1396 and tried various tests and fixes and I
> still
> >> >> >can't
> >> >> >create a user.
> >> >> >
> >> >> >I will be back tomorrow for more research. Any ideas are greatly
> >> >> >appreciated.
> >> >> >
> >> >> >Dan H.
> >> >> >
> >> >> >On Sat, Jul 7, 2012 at 10:21 AM, Dan Healy <dfhealy at gmail.com>
> wrote:
> >> >> >
> >> >> >> I am trying to port my application from Ubuntu 10.04 to Ubuntu
> 12.04
> >> >> >and
> >> >> >> cannot make MySQL work as expected. The database dump sql from
> >> >> >> 10.04
> >> >> >> apparently loaded into MySQL on 12.04 correctly. The privileges
> sql
> >> >> >seemed
> >> >> >> to run to completion OK but I couldn't connect any user other than
> >> >> >root.
> >> >> >>
> >> >> >> I went to the command line, opened MySQL as root, selected the
> >> >> >database to
> >> >> >> use and granted privileges to another user. That worked OK. I
> >> >> >> tried
> >> >> >to
> >> >> >> open MySQL as this new user and got an Access denied message. Any
> >> >> >ideas on
> >> >> >> what I am doing wrong?
> >> >> >>
> >> >> >> Thanks,
> >> >> >>
> >> >> >> Dan H.
> >> >> >>
> >> >>
> >> >> --
> >> >> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
> >> >>
> >> >> --
> >> >> Ubuntu-us-tx mailing list
> >> >> Ubuntu-us-tx at lists.ubuntu.com
> >> >> Modify settings or unsubscribe at:
> >> >> https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-tx
> >> >
> >> >
> >> >
> >> > --
> >> > Ubuntu-us-tx mailing list
> >> > Ubuntu-us-tx at lists.ubuntu.com
> >> > Modify settings or unsubscribe at:
> >> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-tx
> >> >
> >>
> >> --
> >> Ubuntu-us-tx mailing list
> >> Ubuntu-us-tx at lists.ubuntu.com
> >> Modify settings or unsubscribe at:
> >> https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-tx
> >
> >
> >
> > --
> > Ubuntu-us-tx mailing list
> > Ubuntu-us-tx at lists.ubuntu.com
> > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-tx
> >
>
> --
> Ubuntu-us-tx mailing list
> Ubuntu-us-tx at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-tx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-us-tx/attachments/20120710/e5478111/attachment-0001.html>
More information about the Ubuntu-us-tx
mailing list