Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7880053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:03:09+00:00 2026-06-03T04:03:09+00:00

I have an install script that sets up a MySQL user + database +

  • 0

I have an install script that sets up a MySQL user + database + some tables. It worked fine in mysql 5.0, but we recently upgraded to Ubuntu 12.04, which ships with mysql 5.5. However in mysql 5.5 I am getting errors.

The problem seems to be related to adding users. I use a line like this to create a root user, which is later used to login with and set up the rest of the stuff:

INSERT INTO mysql.user VALUES('%','myrootuser','','Y','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'Y','Y','','','','',0,0,0,0,'','');
flush privileges;

The command succeeds. However, when logging in with this new ‘myrootuser’, the user doesn’t seem to have sufficient privileges:

jeroen@jeroen-ubuntu:~$ mysql -u myrootuser -e 'select * from mysql.user;'
ERROR 1142 (42000) at line 1: SELECT command denied to user ''@'localhost' for table 'user'

Also I noticed that I can login with non existing usernames, which might be obfuscating the real problem:

ubuntu@myserver:~$ mysql -u thisuserdoesnotexist
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 40
Server version: 5.5.22-0ubuntu1 (Ubuntu)

mysql>

Has there been some change in the MySQL authentication in 5.5 that I am not aware of?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:03:10+00:00Added an answer on June 3, 2026 at 4:03 am

    For the user creation problem, try using phpMyAdmin to add it. PMA is better than SQL query!

    For your login problem, delete the user * in the user list (use PMA). It will fix your problem! I got the same problem and I did that to fix it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Python script that writes to a MySQL database using mysql-python .
I have a simple inno-setup script that allows my setup to install either the
I have a bash script that installs some software. I want to fail as
I have tryed to run this code in my console: script/plugin install git://github.com/apotonick/cells.git ...but
I have a install script that uses DATE. I'm running SQL Server 2008 R2,
I have the following Ruby script that creates a Debian package, which works fine:
I have a Bash script that basically initializes an application and sets parameters. One
I installed wkhtmltopdf using sudo apt-get install wkhtmltopdf I have a php script that
I have a Bash script that repeatedly copies files every 5 seconds. But this
I have a build script that I use to produce my install files. To

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.