Changed User Privileges And Now I Can't Log In
I read several web sites and O'Reilly's book on MySQL about securing the system tables.
I removed several users and, as advised inthe book and web sites, changed the user "root" to another name with another password.
I removed the site name as a host but kept the IP address.
Now when I use phpMySdmin to get back in, it let's me past the login popup BUT it gives me the message:
Error
MySQL said: Access denied for user: 'root@localhost' (Using password: YES)
The data in the database is not important but the database structure/definition is. I'd like to find a way to back up or dump that. Then I can reload MySQL and start over.
View Complete Forum Thread with Replies
Related Forum Messages:
User Information Changed
The other day someone changed every user's password on my site. Then they changed every user's email address to theirs - I assume the reason was that when the user used the password reset function, they would never see the information. I'm trying to research what/where the vulnerability is in the script that I'm suing, but I don't really know where to start - not being a hacker, I don't even know the terms to search for here or on google. Is this what is meant by mysql injection?
View Replies !
Copy User Privileges To A Newly Created User.
I have just created a user with specific permissions to certain tables in different databases. Now I have to create serveral more users with the same permission. Is there a command in MySQL that allows me to create the new user by copying the privileges from a template user?
View Replies !
A User Dba Privileges
I need to give a special user admin rights to the databases he creates. As there is no dedicated MySQL database server for his needs yet, we created a special user on a multi-purpose MySQL server; this special user has the rights to do everything only on databases he creates. To distinguish his databases among others, we require his databases' names to be prefixed by "PNCC_". Here's how we did the trick: Once logged in as DBA: mysql> GRANT ALL ON PNCC_.* TO fred@my.fqdn.com IDENTIFIED BY 'some_password' WITH GRANT OPTION; (The query ran OK) mysql> UPDATE db SET Db='PNCC_%' WHERE db='PNCC_'; (The query ran OK) (We had to do two different commands, as GRANT does not seem to accept wildcards). From now on, after having flushed privileges, user fred@my.fqdn.com can create databases with names prefixed by "PNCC_", create tables within these databases, and populates them. But this user would like to have the possibility to create users with special privileges on the databases/tables he previously created. The question is: how can I grant fred to create users with rights ONLY on PNCC_<some name> databases, and nothing else (ie. no access to other databases, nor on mysql.*)? Do I need to insert a special row within mysql.user? If so, which one?
View Replies !
User Privileges?
I'm in the root user account. Lets just say I have three databases called "database1","database2","database3". I also have three users called "user1","user2","user3". Now what I'm trying to do is to only allow user1 to acces database1. So when they login all they see is their database. I want them to add tables and do everything along those lines, but I don't want them to see other databases or create databases themsevles. I can't seem to get this right. How do I go about this? I am using phpMyAdmin version 2.6.1.
View Replies !
How To Set User Privileges
How do I need to set Privileges so that a user can create and modify their own databases? I am running MySQL 3.23.53 with phpMyAdmin 2.5.4. I have multiple DBs and users. I setup up a new user and database with no problem. The user can only see the new database as it should be. I would like to allow the user to be able to create their own databases. Right now in phpmyadmin, when they create a new database, they cannot create tables in it, and they can not see the database they just created in their list of databases. Although I can see the database they created with my admin user. When the user First creates a database and tries to create a table they get "select command denied to user". I gave the user global select, but as soon as I do they can see all the databases. I was guessing this is just a Privilege issue, but I am still learning about SQL privileges.
View Replies !
How To Export User Privileges
I am working with MySQL 5.0 and phpMyAdmin. I know how to export (dump) the tables and data of the database with phpMyAdmin, but I couldn't find a way to do the same for the user accounts and their privileges.
View Replies !
No Privileges For Root User
There is no privilege for root @ % for create user, create view, procedures etc. I tried to edit the user table directly. But it doesnt work. Please help to find a solution.
View Replies !
MySQL User / Privileges
1. Does it cause problems if there are multiple users with the same user name? 2. If 'localhost' is specified for the user host, does this mean that they can only gain access if they are logging in from the same host address where mysql is running?
View Replies !
Assigning User Privileges Error
I created a user 'cody' % and localhost and try to assign privileges to his database 'cal_cody' For some reason it don't work, posting this weird thing in forums didn't help either. so I tried: mysql> GRANT ALL PRIVILEGES ON cal_cody.* TO 'cody'@% IDENTIFIED BY 'access'; Query OK, 0 rows affected (0.00 sec) also tried: mysql> GRANT USAGE ON cal_cody.* TO 'cody'@'%' IDENTIFIED BY 'access' Query OK, 0 rows affected (0.00 sec) then tried the same for 'localhost' then even flashed the privileges and even reloaded the mysql service doesn't do jack Is there something wrong with my command, or is there a way to do this through phpmyadmin?
View Replies !
User Privileges In Version 4.1.7(linux)
sql: GRANT USAGE ON *.* TO 'shinestb'@'localhost' IDENTIFIED BY 'shinestb'; FLUSH PRIVIELGES; an error return at login time: ./mysql -ushinestb -p ERROR 1045 (28000): Access denied for user 'shinestb'@'localhost' (using password: NO why? version < 4.1 is ok.
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 !
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 !
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 !
Dont Start If The User Dont Have Administrator Privileges On The PC
I instaled MySQL in a computer (with widows XP) that not always is loged with a user withthe computer administrator privileges. when a person whitout administrator privileges is the first person that logs, the DataBase dont startup until an administrator logs on. What can i do to allways startup the DB without care the computer's administrator privileges?
View Replies !
Changed Characters
While using mysqldump to backup the databases on my server i noticed that all the the portuguese accented characters from my databases get screwed up and changed to wierd characters. What's up?
View Replies !
Get The Latest Changed Records
I hava a table with the following information CREATE TABLE TEMP1 (REFID INT, REVISION INT, FIELDNAM VARCHAR(10), VALUE VARCHAR(10)); INSERT INTO TEMP1 VALUES(1001, 0, A, A2); INSERT INTO TEMP1 VALUES(1001, 0, C, C2); INSERT INTO TEMP1 VALUES(1001, 0, E, E2); INSERT INTO TEMP1 VALUES(1002, 0, A, A3); INSERT INTO TEMP1 VALUES(1002, 0, B, B2); INSERT INTO TEMP1 VALUES(1002, 0, E, E3); INSERT INTO TEMP1 VALUES(1001, 1, A, A4); INSERT INTO TEMP1 VALUES(1001, 1, E, E4); Here based on latest revision and refid I should get the fieldnam and value. Expected output: REFID FIELDNAM VALUE REVISION 1001 A A4 1 1001 E E4 1 1002 B B2 0 1001 C C2 0
View Replies !
Float(m,n) Changed Between Mysql 4.0 And 5.0?
I have a float(11,10) field (default NULL) in one of my MyISAM tables. With MySQL 4.0.16, I can call an Update/Insert query with a value of , say 33.166668 to this field, and it updates correctly. When I retrieve that value again with a select statement, I get something like 33.1666668392 (10 digits after decimal). Which is correct. (The sql_mode server variable is set to 0) With the same field in MySQL 5.0, my experience is different. With the server sql_mode set to one of the strict values( SQL_TRANS_STRICT), i get an error about out of range value for the float field. when I change the sql_mode to not have the SQL_TRANS_STRICT, I get the same error as a warning, 1264 "Out of range...". When I retrieve this value, it is set to 10.0000000000, which is wrong. But , when I change the field description to float(11,5) and do an update, the value is updated right, but I get an intermittent "No rows updated" error. Could anybody please explain if the float definitions changed between versions? Does float(m,n) now mean that I can have only (m-n) digits before decimal point?
View Replies !
Rows Changed In Update SQL
Is there a way to find out how many rows got updated when i execute a update stmt. I would like to get the updated rows count in SQL. Let me know and Thanks in advance. update stmt where clause; now how can i get the count of rows that got updated.
View Replies !
How To Find Out Which Table Is Changed?
I dont have source code of my web application I installed. Its using mysql 5. when I create a new user account, I know "users" tables is changed, but there's also a couple other tables are modified. Is there a way I can find out which table is changed?
View Replies !
History Of Changed Percents
I have a table with data like that: percent date 50% 2007-05-01 30% 2007-05-02 30% 2007-05-03 50% 2007-05-04 50% 2007-05-05 20% 2007-05-06 20% 2007-05-07 50% 2007-05-08 70% 2007-05-09 70% 2007-05-10 The query has to return this rows: 50% 2007-05-01 30% 2007-05-02 50% 2007-05-04 20% 2007-05-06 50% 2007-05-08 70% 2007-05-09
View Replies !
Changed Datadir Now Mysql Won't Run
I changed the datadir using mysql administrator (so I could "see it") (I'm using version 5.0.x under OS X 10.4.5 and now mysql won't run and I don't know how to reset the datadir. I've reinstalled mysql and when I try to run it this is what I get: iBook-G4:/usr/local/mysql michael$ sudo ./bin/mysqld_safe & [16] 12878 iBook-G4:/usr/local/mysql michael$ Starting mysqld daemon with databases from /Users/michael/Sites STOPPING server from pid file /Users/michael/Sites/iBook-G4.pid 060329 12:38:24 mysqld ended
View Replies !
All Swedish Characters Is Changed
I'm doing Kevin Yanks tutorial about how to manage users with session (with some small modifications). But when the data is inserted into the table all Swedish characters is changed to some strange "¥" and "¶". Why is it so and how to fix it? According to PHPAdmin the collation is either UTF-8 (db) or Latin1_swedish (table)?
View Replies !
Changed Root Password, Now I Can't Do Anything
I am following the MySQL by Michael Kofler and looking at securing root access as currently it has no password. I've logged into the MySQL consol and changed password using : mysqladmin -u root -h localhost password XXX However, i now can't do anything in in mysql terminal it comes back "access denied for user 'root'@'localhost' (using password :NO)
View Replies !
Date And Time Stamp A Changed Row
I am about to declare a table with 20 columns. How do I create 4 more columns: 1. current Time 2. current Day of the month 3. current Month 4. current Year Such that: a. These 4 columns are not editable by the user. b. Whenever a row is updated/inserted/replace/etc. then these 4 columns in that row are automatically updated by the system accordingly.
View Replies !
Datetime Field Changed After ALTER
To archive when a row is added, I have a column called date_added which uses the data type DATETIME. I recently added a new column to my table "ALTER TABLE mytable ADD COLUMN mycolumn INT", and my stored dates have all been changed. In hindsight, was this to be expected? I am using PHP to both push data into MySQL and pull data from MySQL. To prevent such future blunders, is it good practice to store dates as CHAR data type, and actively store the date using PHP?
View Replies !
Phone Numbers Changed On Import
I have imported a cvs data file every way I can think of and I always get this weird problem. About 75% of my 4,000 files end up with the phone number 2147483647. I searched the cvs file and this number does not exist there. Is there an explaination for this?
View Replies !
Replication :: Master Log File Position Changed
I have a simple master/slave replication environment that is working smoothly with one exception. If I restart the master server the Master Log File is incremented by one (e.g. the original master log is named data-bin.000001 and the new master log is named data-bin.000002) the slave server never notices that the Master Log File and the Master Log Position have changed. Instead, the slave sits there waiting for new entries in the old Master Log File. I can tell this by executing a SHOW SLAVE STATUS on the slave server. I am not sure about this because I can't find any documentation on the proper behavior of mysql during this scenario, however, I am under the impression that slave server should be able to figure this out and continue replicating, without requiring me to execute an "CHANGE MASTER..." command on the slave server every time the master is restarted. Of course, I assume this same problem will occur when the Master Log File grows to its maximum size and a new Master Log File is created. If anybody who has experience with mysql replication could just confirm that the behavior I am seeing is not correct, that would be great. Or if anybody has any suggestions as to what, if anything, is wrong with my setup. Code:
View Replies !
Row Cannot Be Located For Updating. Some Values Might Have Changed Since It Was Last Updated
I've recently migrated from access to mysql with vb6). Unfortunately, i get the following error whenever the .update is executed on the recordset. "Row Cannot be located for updating. Some values might have changed since it was last updated" The select statement is: Select * from tablename, connection,3,3 (have also modified the 3,3, to be adOpenDynamic, adLockOptimistic) I have tried checking the flag To Return Matching Rows, I've added the option = 2 in the connection string, i have a primary key field in the table, and I've also tried re-assigning it to itself.
View Replies !
String Error - Quotes Changed To Question Marks
I recently converted an asp/access site to an asp/mysql site. Now all my strings are displaying funky. For example if I have the text - Why don't we say "Yipee" - it displays on my site as - Why don?t we say ?Yipee?. The same change is being made when I use a sentence with "..." in it. I like ... baseball is changed to - I like?baseball. Any thoughts as to why this is happening? Sometimes it is actually being changed somehow in the database, and sometimes it is correct in the database, but then changed when it displays on the web.
View Replies !
Mysql Appears To Have Changed The 'password' Function Hashing
I've been using Mysql for about 6 months but in fairly basic fashion. For a cms I have built, I have a users table, with userName and password fields. An admin can create new users, and the password is hashed using the PASSWORD() function. SQL: "INSERT INTO users VALUES ('', '$userName', PASSWORD('$userPwd')) Straight out of the book basically. Now the problem is that all this has been functioning fine on a couple of sites on external servers, plus a couple of local machines. Until today, on my main dev machine - yesterday a user could log in, today they couldn't. As far as I can tell, nothing has changed. But when I look at the hashes in the database table, they are 41 chrs, and when I add a new user, the hash is 16 characters. I know that at some stage the hash length was increased between mysql versions, but I have not updated the install (I run XAMPP for Windows 1.4.14, which appears to install php 5.0.4 and mysql 4.1.12) Is there any other reason that the hash length could change to 16? I'd like to know why this happened so that I'm prepared if it happens on the server (where it is not so easy to hack in and add new users that can log in again)
View Replies !
Error 1142 - Mes. The Following Occured: SELECT Command Denied To User Xx@hostx.com For Table 'user
When trying to do anything to do with "User Administration" in MySQL Administrator 5.1 connecting to a remote MySQL database, I get the following message when I click on the "User Administration" icon/text in top left frame. Verbatim quote apart from my connection details which I am anonymising): A MySQL error was encountered. The message is: Could not fetch user names. The following occured: SELECT command denied to user xxx@hostxxx.xxx.xxx.com for table 'user' (1142) No I have looked through search and found the following: http://lists.mysql.com/mysql/134369 Unfortunately that tells me that it has happened to someone else but that's about it. What is one supposed to do with the fix? I am wondering if this is why I cannot create ordrop any tables with this username at the moment, even though it is the Admin level username....
View Replies !
Own Privileges
Is there a way for a user to get knowledge about his own privileges? For example can a user know if he/she has rights to INSERT INTO some = table? I'm using PHP4.
View Replies !
No Privileges
I have installed PHP and MYSQL as a testing server on my local machine using xampp. I then copied over the SQL data folders from my old machine. When I go into PHPMYADMIN the only database I can see is the informationschema and under create new database it states that I have no privelidges.
View Replies !
Privileges
My .net application connects to MySQL database. A developer created this MySQL database and few tables. Now when I try to create another table for my application it is giving me this error "ERROR 1142 (42000): CREATE command denied to user 'username'@'localhost' for table 'tablename'." Even i tried to grant all the privileges to my user name using the below command "GRANT ALL ON dbname.* TO 'username'@'localhost'; but still iam getting the following error "ERROR 1044 (42000): Access denied for user 'username'@'%' to database 'dbname'" Even i tried to create a new database but still i am getting an error.
View Replies !
Root User Denied Access To Fetch User List.
I can still log onto MySQL administrator or the command line program but I somehow appear to have lost all priveliges to alter or view the user list from this account. Even under the command line interface I can login but it tells me access is denied when I try to alter "root" permissions on a database. I cannot seem to log onto any of the other accounts created but obviously if I could get into the user admin I could solve this.
View Replies !
Database Privileges
I was wondering if there is a way to prevent useres from creating databases. The scenario is for a web hosting environment where I would like to let users only use their pre-defined database and not be able to create any additional database (e.g. via phpmyadmin).
View Replies !
Setting Up Privileges
if I can restrict a user from a single table. I want him to be able to create,alter,delete all the tables but one, which I want him not to delete it, not to update it not to create it.Just to use it. Can I do it? As long as I have read there is only the way to give credentials for all the objects of the database.
View Replies !
Changing Privileges
I need help changing host privileges in mySQL server. I am trying to access mySQL server from a remote computer that doesn't have access rights. The online doc sucks; I can't get anything useful out of it.
View Replies !
GRANT ALL PRIVILEGES ON Db.* .....
Having read, as best I could, the docs at http://www.mysql.com/documentation ..., on host (Linux from scratch, kernel 2.4.20) "mysql.here.com" I enter: mysql> GRANT ALL PRIVILEGES ON db.* TO root@'max.here.com'; Query OK, 0 rows affected (0.00 sec) but ... [root@max.here.com]# mysql -h mysql.here.com -u root -pmypass ERROR 1045: Access denied for user: 'root@max.here.com' (Using password: YES) "netstat -lt" on mysql.here.com shows the socket is listening okay. tcp 0 0 *:mysql *:* LISTEN.
View Replies !
|