FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


I want to create a user "root" MySQL 5.7.17 on Ubu





teso
Good day to all,

For certain time I face one and the same problem with the access to MySQL. I need to create and import a database but my default user have no necessary privileges to do it.

The operating system is Linux, distribution Ubuntu 16.04, additional details about OS and platform:
Code:
# uname -a
Linux improve1 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:36:54 UTC 2017 i686 i686 i686 GNU/Linux


This is my MySQL version:
Code:
# mysql --version
mysql  Ver 14.14 Distrib 5.7.17, for Linux (i686) using  EditLine wrapper 


The only user created (I was allowed to create only it) during installation is named "phpmyadmin"

If i make attempt to use this user privileges usnig phpMyAdmin (at http://localhost/phpmyadmin)
I see a problem like this http://www.frihost.com/forums/vt-152987.html

If try to do it after console login I have the following problem:
Code:
mysql> CREATE DATABASE bulterm;
ERROR 1044 (42000): Access denied for user 'phpmyadmin'@'localhost' to database 'bulterm'


I want to create a MySQL user "root" with full privileges to do everything.
Does somebody have an idea how I can resolve my problem?

Thanks in advance!
smljackson
You can not create root user. Because "root" already exists in mysql. You must have set the password for this user when you installed mysql .

Open your terminal window and type the following

Code:
mysql -u root -p


You will be prompted to enter the password. Please enter the password for the root user.

Please enter the following code:

Code:
create database testdb;
create user 'testuser'@'localhost' identified by 'password';
grant all on testdb.* to 'testuser';


This will create a databse "testdb" and user "testuser".
teso
smljackson wrote:
You can not create root user. Because "root" already exists in mysql. You must have set the password for this user when you installed mysql .

Open your terminal window and type the following

Code:
mysql -u root -p


You will be prompted to enter the password. Please enter the password for the root user.


Unfortunately it doesn't help me! That's the result:
Code:
# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


The password is the same one I entered during the installation, but my access is denied.
Related topics
V Bulletin dökümanlarý
mobile programmers codes
error with MySQL
Mysql 5.0 and its limitation
Good PHP Books
Need help with mySQL
PHP that creates subdomain, ftp account, and mysql database?
my sql create user problem
Database connection class!
WAMP Instalation
setting up a drupal 5.7 site
How to Reset Password of root user in MySQL
mysql adding new user with shell
How to make this code simple?
How To Disable Net User Command in Windows 7
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.