Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Create User Account To Database


I have created a new database called "mydatabase" .Now I want to create a user account to this database.




View Complete Forum Thread with Replies

Related Forum Messages:
Create New User Account
I need to create a new user account in MySQL.

When I installed MySQL, it asked for a password and username which I provided.
Now when I open MySQL, it asks for my password but when I enter it, MySQL closes, however, if I hit return it opens MySQL.....any particular reason?

View Replies !
How To Create User Except Root Account ?
how to create user except root account ?

View Replies !
Create Error: Access Denied For User: '@localhost' To Database 'database Name'
I have already installed the php4, apache and mySQL on windowsXP SP2.
when I wanted to create database through PHP code it showed me error like this "Create Error: Access denied for user: '@localhost' to database 'database name'" and I can't even create database using mySQL either.

View Replies !
Can't Create A New Account
I am trying to create a new account called user but every time I do it I get an error that says incorrect syntax. I have tried:

create on *.* to user@localhost identified by pass;
create on *.* to user@localhost identified by 'pass';
create user user identified by pass;
create user user identified by 'pass';
grant all privilages on *.* to user@localhost identified by pass;
grant all privilages on *.* to user@localhost identified by 'pass';
create user user password pass;
create user user password 'pass';

I have found all these on the web in sql help pages but none work. Can someone tell me how to create a new user account?

View Replies !
Is A New User Cannot Create Database?
I have recently installed MySql and graphical tools to manage. After installation with root password set, i have connected with graphical admin tool and created a user and set all the previlages to mysql database. I connected with the newly created user and, Using MySql Query browser, i tried to create a new database (or schema) I got an error

Access denied for user 'ADMIN'@'%' to database 'TestDB'

My host is : localhost

My initial doubt is 'Whether a new user, created by root, cannot create his own databases?

View Replies !
Creating New User Account
I have followed the manual for MySQL 5.0 for adding new accounts to MySQL but it will not work for me. I am typing these commands on the root on the actual computer with MySQL.

Every time I input these following commands, the command just returns this:

mysql> Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'myusername'@'localhost'
-> IDENTIFIED BY 'mypass' WITH GRANT OPTION;

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
-> ON mydatabase.*
-> TO 'myusername'@'localhost'
-> IDENTIFIED BY 'mypassword';

I've also tried this one
mysql> CREATE USER 'myusername'@'localhost' IDENTIFIED BY 'mypassword';

But it returns

mysql> ERROR (HY000): Opteration CREATE USER failed for 'myusername'@'localhost' .

View Replies !
User Priviliges To Create Database
I am trying to create a user. The user should be able to create database, but he should not be able to use other databases created by other users.

View Replies !
Show Databases In User Account
Is there a way to only let the users see databases in there own account.
After whats the point of having a username and password if they can see
the other databases. I'm trying to setup a server with many users I want
to grant each user a database but how on earth do I stop them seeing
other databases.

View Replies !
Limit Space In The User Account
I was searching information how to limit space for the user.
eg. user account will be have 5MB space to database.

View Replies !
Temporarily Lock A User Account
There are times when I need to be able to temporarily lock a user's account so that they cannot login to a dabase.

I know that revoking all of their privileges will work, but if I have a user with a complex set of privileges that can be a real pain to reset them.

View Replies !
How To Grant 'create Database' Privileges To A User
I created a user and wanted to allow he to create a database, how to grant the 'create' database privielege to he.

> create user joe identified by '123456';
> use mysql;
> update user set Create_priv='Y' where user='joe';

I know I can update the user table,but I'd like to know if these is dedicated statement for this purpose

View Replies !
Syntax Error When Creating A User Account
I want to add new account to mysql v. 4.0.21
Here is the sintax:

mysql> GRANT USAGE ON *.* TO acid@localhost IDENTIFIED BY "acid1";

When i try this I get an error 1064: You have an error in your sql sintax...

View Replies !
#1044 - Access Denied For User When Im Traing To Create A Database
Im train to create a database in my host (not local) that support MySql-5-2 but when i type in the code show me the error:
----------------------------------------------------
--
-- Database: `database`
--
CREATE DATABASE `database` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

MySQL said: Documentation
#1044 - Access denied for user 'user'@'host' to database 'database'
----------------------------------------------------

my code is:
----------------------------------------------------
-- phpMyAdmin SQL Dump
-- version 3.0.1.1
--
-- Host: localhost
-- Generation Time: Mar 22, 2009 at 09:31 PM
-- Server version: 5.0.51
-- PHP Version: 5.2.6

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `database`
--
CREATE DATABASE `database` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `database`;

View Replies !
Login As Root User, And Grant Create Database Privileges
I am new, and I have been trying to find info on this unsuccessfully.

Ok, so I am using Unix Terminal from my Mac.

From the command prompt, I use

Shell>/usr/local/mysql/bin/mysql

to log in to the localhost user.

Now, from the command prompt, i have tried using ,mysql -u root, and it says command not found!

View Replies !
Could Not Connect To The Database, Please Recheck The Settings You Specified. Also Make Sure That A Database With The Name You Specified Already Exists On The Database Server. PhpAdsNew Will Not Create The Database For You, You Must Create It Manually
The error message I get above is the same everytime when trying to install phpAdsnew. I have tried everything. I am hosted through yahoo! and have actually succesfully installed scripts before even though I know nothing about it. Now that I have a "auto-install", it does not work. Yahoo! also offers php-nuke with the auto-install where you just click a few buttons, and I get a similar error stating that it can not conect to the database.

Please can anyone help me and tell me what I am doing wrong?

View Replies !
Create User :: User Created But Password?
If I run the below statement as a user with the create permission turned on, the user gets created but without the password. Any suggestions?

CREATE USER 'fcms_testUser1'@'localhost' IDENTIFIED BY 'dumbpass12A'

View Replies !
How Do I Import A Mysql Database To Godaddy Hosting Account?
i dont know whether this is the right forum 2ask on.... But Id like to know how can I upload import a Mysql database into my hosting account at Godaddy...


View Replies !
Can't Create New User In 4.1.18
this is what I am doing:

mySQL> GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON store. TO
newusername@127.0.0.1 IDENTIFIED BY 'newpassword';

I have tried leaving out , LOCK TABLES ON
also just ,LOCK TABLES

it keeps saying:
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'TO newusername@127.0.0.1 IDENTIFIED BY
'newpassword'' at line 1


I am using 4.1.18

View Replies !
Cannot Create User
I have a problem with mySql server: I can only run it as root. I use
mySql 4.0.15 and phpMyAdmin 2.5.5. on Mac OSX 10.3.2.

I run mySql server as root, log in via phpMyAdmin as root and I see
there is no user mysql when I click 'Privileges'. When I try to make
new user 'MySql' (with minimal privileges) and click 'Go' I get an
error 'unknown command'. The corresponding mySql statement is:

GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , INDEX ,
ALTER , CREATE TEMPORARY TABLES ON * . * TO "mysql"@ "%"IDENTIFIED BY
"*****"WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0
MAX_UPDATES_PER_HOUR 0 ;

#1047 - Unknown command


How can I log in as user root and not have Grant privileges???
More importantly, how can I create a user mysql with the normal set of
privileges (update, create, alter etc)?

I have been using the procedure described on the mysql.com website
'A.4.2 How to Reset a Forgotten Root Password' to reset the password
for root.

View Replies !
Create User
I have a problem with mySql server: I can only run it as root. I use mySql 4.0.15 and phpMyAdmin 2.5.5. on Mac OSX 10.3.2.

I run mySql server as root, log in via phpMyAdmin as root and I see there is no user mysql when I click 'Privileges'. When I try to make new user 'MySql' (with minimal privileges) and click 'Go' I get an error 'unknown command'. The corresponding mySql statement is:

GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , INDEX , ALTER , CREATE TEMPORARY TABLES ON * . * TO "mysql"@ "%"IDENTIFIED BY "*****" WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 ;

#1047 - Unknown command

How can I log in as user root and not have Grant privileges???

More importantly, how can I create a user mysql with the normal set of privileges (update, create, alter etc)?

I have been using the procedure described on the mysql.com website 'A.4.2 How to Reset a Forgotten Root Password' to reset the password for root.

View Replies !
Create New User
I need to create users in mysql using commaind line. Is there any single command line avilable to do this task?

View Replies !
Create User In 5.1
i have created a user in phpmyadmin and given the account a password but no matter what I seem to try the user cannot connect with that password (they get in without specifying a password.

This is a fresh installation of fedora core 5 in case it matters.

View Replies !
Create User If Not Exist
I have a table of userids/usernames and another table which has data about games consisting of the users. What I want to do is to automatically add a user if they don't already exist in the table. I do this now:


Code:

INSERT INTO dkblue ( g_id , g_buyin , g_userid , g_finish , g_payout )

VALUES ( $gameid , $buyin ,

( select u_userid from usernames where u_name = '$value' )

, $key , $payouts[$key] )



As you can see, the value for g_userid is retrieved from the subquery. But this obviously does not work when the user does not exist. Is there a way to do this in a query or should I make sure all users exist on the PHP end before doing this ? I have just started trying to use subqueries and this one has me stumped.

View Replies !
Create User Statement
This create statement is giving error :
Code:
create user username@localhost identified by password

Can someone plz correct this statement??

View Replies !
Can't Use CREATE USER As Root?
I've just freshly installed mysql on my debian system. Binary from the repository, didn't have the nerve to do a source installation. I did mysql_install_db, set my root pw and logged in. Of course, I wanted to create a new user. But what do I get?

Your MySQL connection id is 1 to server version: 4.0.23_Debian-7-log

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> CREATE USER bla;

ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'USER bla' at line 1

View Replies !
Create User With All Priveleges Except...
I want to create a new user with all privleges excpet for: Create, Create User, Drop, Show Databases, Shutdown, Super, And Grant. What would my syntax be for this?

View Replies !
Create User Easy?
Is there an easy way I can just create a MySQL User... and give him the privledges to only do things to databases that he from now on creates..?

Or is it gonna be every time I create a database I would have to give him privledge to that database? What type of route would I have to go with that...

Also when his user connects to the MySQL Server is there a way I can do a SHOW DATABASES and show only the databases that he has created? He needs to also be able to Create/DELETE/APPEND/UPDATE any database that he creates.

What's the easiset way about going around this route? Am I going to have to Grant him Permissions on every database that he creates? Does the root account have to grant the permissions?

View Replies !
Create User Command
I'm trying to create a user with the following command:
create user root@xxxxx.lccc.edu identified by payment$;
grant all on *.* to root@xxxxx.lccc.edu;

I'm getting the following erro: 1064 error in syntax near 'user root......'

This is an older version of mysql (1.x) so I'm running the folowing command from the bin directory:

mysql -u<admin id> -p<password> < d:create_user.sql

View Replies !
Create User/Pass
how do i create a username and password for a database? i tried using....

GRANT ALL ON database.* TO user_name IDENTIFIED BY 'password'

that gave me a "access denied" error. is that command just to set a users accesss level? is there i different command to make a username/password?

View Replies !
Create A DB With A User And Password
How do you set a user name and password from the command line?

something like

mysql>create database myDB -user myUser -password myPass

Is that correct?

View Replies !
Deleted Root User From 'user' Database!
I so stupidly deleted the root user from my mysql > user database. Now I can't login to mysql. I uninstalled the rpm and reinstalled it but it still won't let me setup a new root user. How can I delete the mysql data files so that I start again, fresh? Where are these files located? I can't find them anywhere after removing the RPM but they are obviously there because upon reinstalling the RPM I'm still in the same position--I try to do

mysqladmin -u root password 'password'

but it says "Access denied for user root@localhost"

View Replies !
Change/Create User Permissions
I have a remote db that I want to backup to my local MySQL server (windows). I can do a dump of the db
from phpMyAdmin on the remote server. I try running it on my local server through the MySQL Control Center, and it says "Read Only". I don't have to enter password for root@localhost to login to the Control Center. I assume I don't have permissions to run DDL scripts as this user, and I can't figure out how to change this users permissions or create a new user with different privileges.

View Replies !
Create User And Privs Settings
Here is the idea. I have 1 database 'a'. I want a user that can only 'SELECT' on this database, so I type:

GRANT SELECT ON a.* TO 'abc'@'localhost' IDENTIFIED BY 'abc' ;

After a while I get an other database 'b'.
Now I get confused. I want this 'abc; user to have 'SELECT' privs on this db too, so I can do (I think):

GRANT SELECT ON b.* TO 'abc'@'localhost' IDENTIFIED BY 'abc' ;

But I can also do:

GRANT SELECT ON b.* TO 'abc'@'localhost'

is there a difference ? and is this the way to extend privs ?

View Replies !
Create New User ... Error In Syntax?
I'm trying to create a new user using this statement:

mysql> CREATE USER 'user1'@'localhost'
-> IDENTIFIED BY 'userpass';
ERROR 1064: You have an error in your SQL syntax near ''user1'@'localhost'
IDENTIFIED BY 'userpass'' at line 1

My mysql status:

mysql> status
--------------
mysql Ver 9.38 Distrib 3.22.32, for pc-linux-gnu (i686)

The mysql server is on my webhost and I need to SSH to do this.
Can you guys enlighten me on what does the error means?

View Replies !
Create User Command Trouble
Im having trouble using the CREATE USER command...

View Replies !
Setting Up User Able To Create Databases
Using mysql 4.1.14, I'm trying to set up privileges for a user such that the user can create databases and then has full access to the databases he's created, including the ability to delete those databases, but not have any access to any databases he hasn't created. This should be trivially easy, but I can not work out how and where to set privileges to do this.

View Replies !
What Is The Difference Between CREATE USER And GRANT ?
What is the difference between CREATE USER and GRANT ? When should which one be used?

View Replies !
How To Create User And Password In Phpmyadmin
I built a couple of databases on my new localhost for Joomla, and did not specify uesrname and password, and guess what? I know about the security issue, but worse than that, installation cannot continue until I can figure out how to create username and password, either in a sql window, or mysql console,

View Replies !
Necessary Privelegs To Create Or Delete An User

thx to this forum, I can now get a user-list out of mysql. But when I now try to delete an user or create a new one, I will get

ADO-Error=0
Source="Microsoft OLE DB Provider for ODBC Drivers"
Description="[MySQL][ODBC 3.51 Driver]Access denied for user 'xxx'@'yyy' (using password: YES)"

I use SQLExecute "DROP USER xyz" or "CREATE USER xyz IDENTIFIED BY pwd"


View Replies !
Can't Create The System/user MySQL Tables
I have mysql installed via rpm package, but when I check the data
dirs, the only table there is "test". The instructions say there
should be others, like users tables, and other such tables.

I stopped the server and ran mysql_install_db which is the command to
create these, I get the following excerpt:

linux:/usr/bin # mysql_install_db --user=mysql
Installing all prepared tables
050304 6:10:00 [Warning] Asked for 196608 thread stack, but got
126976
Fill help tables
050304 6:10:00 [Warning] Asked for 196608 thread stack, but got
126976
.....

But when I check, it doesn't seem to make these tables, only the test
table.

Is this normal? I thought the user table contains the login info, so
if there isn't one, how can I log in?

View Replies !
Limit The Number Of Databases A User Can Create?
how can I limit the number of databases a user can create? I wish to create an account in mysql for each site on my host computer and set the max number of databases each site can create.

View Replies !
Create User With Full Privileges As Root
I am trying to create a user with full privileges in addition to the root account, without that user being able to modifiy or even see root's databases. (My goal is to have a user that can create and edit databases, but without being able to access roots stuff). Does anyone know how to do this?

And while on the topic of users, when doing a grant to username, is it possible to see if the username already exists and to stop the overwrite of that users priveleges?

View Replies !
Problem Create New Mysql User W/ Php Code
trying to create new mysql user w/ php code as below, but always got error message "Error, insert query failed". Please, point out what I did wrong and how to fix it.


<?php
$connect = mysql_pconnect('localhost', $AdminName, $AdminPass)
or die('Error, login db failed');
mysql_select_db(mysql) or die('Error, open db failed');

$query = "INSERT INTO user(Host, User, Password)
VALUES('localhost', '$UserName', '$UserPass')";
mysql_query($query) or die('Error, insert query failed');
$query = "FLUSH PRIVILEGES";
mysql_query($query) or die('Error, flush query failed');
?>


And even tried it w/ this code
[
$query = "INSERT INTO user
(Host, User, Password, Select_priv, Insert_priv, Update_priv)
VALUES ('localhost', $UserName, PASSWORD($UserPass), 'Y', 'Y', 'Y')";


Already searched but not successful, so if this problem was posted here, please post the link here.

View Replies !
ERROR 1410 (42000): You Are Not Allowed To Create A User
I have created a user with grant option for e.g.
Logged in as root
grant select on patient.d_user_info to test1 identified by 'test1' with grant option;
// User is created Successfully
Logged in as test1
grant select on patient.d_user_info to test2.
// I get the you are not allowed error.

Also on a related note the command
grant select on patient.d_user_info to test1 identified by 'test1' with grant option
// when changed to
grant select on patient.d_user_info to test1 identified by password 'test1' with grant option produces the following error
ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number.

View Replies !
Unable To Create User-defined Data Type
I want to create a user defined data type, but when I use the syntax:

CREATE DOMAIN newdataType AS INTEGER; (for example)

MYSQL returns the following error message:
ERROR 1064 (42000) : You have an error in your sql syntax; check the manual that corresponds to your MYSQL Server version for the right syntax to use
CREATE DOMAIN newdataType AS INTEGER;

I have checked the MYSQL documentation and this forum but came up empty.

View Replies !
Create Database Mysql Database In My System
I have installed MySQL 4.1.7-Standard in MacOS X (10.3.5). I have ONLY database test. According to the manual there should be TWO. test and mysql. I have re-run mysql_install_db several times with he same result. Can some mysql guru explain or point me to the right page to have this mysql database in my system?

View Replies !
Why Do I Get &amp;quot;ERROR 1142 (42000): CREATE VIEW Command Denied To User...&amp;quot;
I can't figure out why I get the following error. When creating this user?

> create user 'callagga'@'localhost' identified by 'password';
> grant all on myequity_production.* to 'callagga'@'localhost' identified by 'password' with grant option;
> create view test_view as select * from transactions;ERROR 1142 (42000): CREATE VIEW command denied to user 'callagga'@'localhost' for table 'test_view'mysql>

Any ideas why? Note below in select * from db, all the fields are "Y" (i.e. doesn't this mean this user should have all privileges for this database).......

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved