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 Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
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 !
View Related
#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 !
View Related
Easy Query...probably
I've got three tables: - events - tasks - docs Events are made up of one or more tasks and tasks may or may not have docs. What I need to do is get all the events with associated tasks and docs.
View Replies !
View Related
QUICK AND EASY ONE
im fairly new to php/mysql so please bear with me I am trying to upload a txt.file created from an excel spreadsheet using the following query: LOAD DATA INFILE 'path/file.txt' INTO TABLE my_table; im getting a syntax error! what could be wrong? are there any other attributes i should be adding to this query? i also tried uploading a csv version of the same file and get the same error.
View Replies !
View Related
Help With A (probably) Easy Query
I am trying to write a query to run through phpmyadmin. What I have is this: In table "vb_user" I want to pull the data in field "username" and copy that username in another table called "vb_userfield" in a field called "field5". Both tables share the field "userid" which is how the relation is made. I know this is probably very simple but man... I just can't seem to pull it off. I've got about 500 members and I really want to populate that field "field5" with thier username without having every one of them doing it manually.
View Replies !
View Related
Easy Collation Changing.
A while ago, I messed around with collations etc, without understanding the rammifications.Ended up with some tables swedish, some general and others, but all were under Latin1. After some time a few queries started breaking. Anyway, I played and tinkered and eventually managed to fix. The problem was that I couldn't go and Alter thousands of columns manually, so a PHP script was created, and works fine. But for the sake of knowledge, is there a way to change the Character Set and Collation stuff of an entire database(s) quickly and easily using SQL?
View Replies !
View Related
Select Row From Table, EASY
I'm drawing a blank and can't find it my Sams 24 hour book. I've got a player name and stats in a DB so a row in the database would look like Chris Brown 300 1200 5 40 325 2 I need to select(display PHP) Chris Brown and everything associated with him. I had this all setup and haven't thought of it in years and now....geesh I just feel like an idiot as nothing I've tried works and I know it's connect to DB then one line of code, a select statement.
View Replies !
View Related
I Think It's An Easy To Fix Sql Syntax Problem
can anybody help me : @mysql_query("INSERT INTO leden WHERE gebruikersnaam = ".lekubb($_POST['gebruikersnaam'])." (status) VALUES (Global Admin)") or die(mysql_error()); Ik get this error : 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 'WHERE gebruikersnaam = t (status) VALUES (Global Admin)' at lin You can see the script online at http://www.webmasterhelp.be/systeem/testje.php When you fill in something and press enter you'll see the error. If you need more info or something you can mail me at arne_dejongh2@hotmail.com or post something here.
View Replies !
View Related
Easy Way To Delete Duplicates?
I had 2 membership db's. One had all the members (65K) db2 had all the members that have registered on the website. I am wanting to consolidate the two. Basically i took both, and merged them together into their own db. now the membership list is about 80k. 20k or so of that are duplicates. My idea was to export the thing as .xls and remove the duplicates via Microsoft Excel. However, Excel has a limit of 65Kish rows. so i can't really go about that.
View Replies !
View Related
Easy Way To Get Time Zone Offset
I need to get the standard offset value from GMT for any given time zone name in the mysql.time_zone_name table. Is there an way in MySQL to do this? For example: I have 'US/Eastern' time zone. I know that the value I'm looking for is -5. How can I get this out of MySQL. I don't care about DST offset, just standard time offset.
View Replies !
View Related
Sql Virgin. An Easy Question For U Experts Im Sure
Im a database virgin, i would like to know more but find it quite confusing, although im sure its not! Im setting up a cms and have installed wamp on my machine and its working. Now the cms has asked me to create a sql database so ive gone to php my admin and put a name in the creat field and created it. Its showing in the left field of phpmy admin. Now the cms is asking for the name of mysql login and mysql passwoord! Where the hell do i find that? ive never created one!
View Replies !
View Related
Easy Question Re: Type Sizes
Just wondered, what exactly does: int(11) do does that mean you could store UP to an 11 digit number in the field? ie. 01234567890 with the highest possible number: 99999999999 and does the same apply to tinyint and all the other int types? if that is the case, why would one chose tinyint(1) over int(1)? and also I guess the same goes with text/varchar types.
View Replies !
View Related
Quick And Easy Update Query? Or Not Possible?
I need to do a global change to a column in my database. I know this is poor planning on my part, but I recently made a change to all of my image extensions for speed purposes. I have a column called thumbnail_path, and every value ends with .GIF. I would like to change them to all end in .JPG. How can I do this? Is this even possible to do in one update query? or will I need to select, parse w/ php and then update?
View Replies !
View Related
|