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.





Restore Default User Table


For some reason the mysql database does not contain any tables;

How do i restore the default user table?

I tryed to reinstall mysql:

yum remove mysql httpd php php-mysql mysql mysql-server

yum install mysql httpd php php-mysql mysql mysql-server

service mysqld start

[root@localhost] ~ : mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 30 to server version: 4.1.20

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

mysql> show databases;
+----------+
| Database |
+----------+
| mysql |
| test |
+----------+
2 rows in set (0.00 sec)

mysql> use mysql;
Database changed
mysql> show tables;
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql'
mysql>

But i still dont have permission to create a new database, cause mysql database have no tables.




View Complete Forum Thread with Replies

Related Forum Messages:
How To Restore Default Settings Of Mysql
i have dump all things from A computer database to B computer database; but it replace all settings on B computer database, i want to restore all the setting of B like a default settings after installaitonl.

View Replies !
Restore Rights Of User Root
I have the problem that I can't see all databases as user root and I have no longer the right to create new databases. How can I get this right (privilege) back?

View Replies !
Backup/restore User Accounts
I have mysql 5.0.14? installed.
I need to make a fresh installation of 5.0.18 (no update).
I can create a backup of my database (export) and import it
into the new version.

But how can I migrate my useraccounts?

The probem is, I tried re-creating a user with same pwd in the new version,
assigned privileges to that user and the user to my freshly imported database,
but when trying to access the DB using a script, it tells me that "user" has no access.

View Replies !
Can You Retrieve/restore A MySQL User Password ?
Subject: Can you retrieve/restore a MySQL user Password?

I'm working on my own, local WXP, MySQL, version: 3.23.38-nt and I have the "root" password, and normally use the root account.

I have forgotten one of the Passwords for a user account which I have set up. Is there any way to UnEncrypt the users password, so I can use that account again? Any handy function that the "root" account can use, to determine a user's password?

OR

Should I delete the account and start from scratch?

OR

Should I re-apply GRANT statements so as to reset user/pass info?

View Replies !
Default Mysql User
I need to know the user name of my "mysql" database so i can connect it to other applications.

So far i haven't created any new profiles, so i'm only prompted to enter the user password when i start up mysql.

Would the default users name in my case be "root" or is that only on unix machines? (i'm running mysql on win2000)


View Replies !
Default Password And User-id For DBA???
what is the default pw and user-id for Mysql log-in ???

View Replies !
User Name Null And Socket Default
I installed mysql 4.1.11 in a linux workstation and started it new. I have 2 problems

1. socket defaults to /tmp/mysql.sock. <- How will I change the default socket to another directory where it actually resides.

2. When I enter in mysql, and do something the user name is forgotten and hence I get this error message.
(I tried with both --user option and without it.)

Access denied for user ''@'localhost' to database 'mysql'

When I work as a root user there is no problem.

View Replies !
Default User Error 1045
mysql install is ok,I did not choose a password。so my username is 'root' and my password is 'root',my host address is 'localhost',my Port is '3306',my database is empty,why connection filed? error is access denied for user 'root'@'localhost'(useing password:YES).

View Replies !
MySQL Admin :: Default User Name?
I created an instance using "MySql Server Instance Config Wizard" then opened MySql Administrator, where I was asked to supply a user name and password for the connection. I did not supply a user name creating the Instance. Is there a default user name? How do I login? Windows XP OS

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 !
Restore Table
I am using mysql on my local machine, Windows operating system. I accidently execute an update statement without where condition, so I messed up all the records in this table, is there any solutions (or tricks) to restore data? I did not have any backup yet.

View Replies !
Dump And Restore A Single Table
How would I run a mysql dump to only dump one table from a database?

With the dumped table I would like to transfer that table into another database, using mysql import.

I looked through the docs on the mysql site but cannot figure it out. Is this possible?

View Replies !
How To Restore A Single Table From A Mysqldump Database Backup?
I have taken dump of all database using

mysqldump --all-databases > all_databases.sql

and there are 5 DB's

now one of my DB has got corrupted .So is it possible to replace that Db using the dump file?

View Replies !
Settig A Table To Its Default Value
I just need to know what syntax do I use to set a table to its default values. Like here is the problem that I have. I run a traffic exchange site and I have 700 customers. And I need to reset everybody's account balances back to zero(which is the default value)

How would I change the balances back to zero using a database query? The reason that I need to know this is because I don't want to have to go through everybodies account one by one and change their balance.

View Replies !
Default Table Type On MySQL 5
I seem to recall reading somewhere that InnoDB was the default table type for MySQL 5. Yet when I did a 'show table types' it indicated that MyISAM was the default type since version 3.

View Replies !
Default Database/table Charset
i'm trying to get UTF-8 working in my PHP app. It's all good now except for one thing.

During the installation process, I use the AdoDB XML Schema class to automatically create the necessary tables from XML files. This is great, but has the drawback that I don't get to specify the Character Set of the new tables, as AdoDb doesn't support that yet. What I'm looking for is the best way to get the desired result: all tables using the UTF-8 charset.

Form what I can understand of the manual, I can set the default charset of the database, then create the tables and they will inherit the charset. However, as my app may not be the only one using this particular database, it's important that I restore the default charset after I've finished the installation.

Does this sound like the right way to go? Basically, I run:

SHOW VARIABLES LIKE 'character_set_database'
...to get the previous default, then set the default to utf8, then install the tables and finally return the charset to whatever it was previously.

View Replies !
How To Select Default Value If The Given Entry Doesn't Exist In Table?
user | data
----------------------
root | data1
mike | data2
default | data3
----------------------
I need to select some data from the data column for a user, which is very simple:
> select data from table where user='mike'
Problem: when a user doesn't not exist in the table, the select query has to return data for "default" user (also in the table) and I don't know how to do it. So, it should be something like this:
> select data from table where <if john exists user='john'> <else user='default'>
in the table above, user 'john' doesn't exist and this query is supposed to return 'data3' value.
I've read that "if/then", "if exists" statements are used in procedures only,

View Replies !
CREATE TABLE With DEFAULT CHARSET In MySQL &lt; 4.1
Ok, I've read the whole chapter 10 of the reference manual and now I know, that only MySQL Version up from 4.1 support the

CREATE TABLE tbl (cols) DEFAULT CHARACTER SET foo COLLATE bar

statement. But is it possible to create tables with special charactersets (at least UTF8) with a MySQL version prior to 4.1?

View Replies !
Create Table :: Right Syntax To Use Near 'DEFAULT CHARSET=latin1'
Why would the following SQL cause an error when run?

CREATE TABLE `webportal_adminips` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`strip` varchar( 20 ) default NULL ,
`blnactive` enum( 'yes', 'no' ) default NULL ,
PRIMARY KEY ( `id` )
) ENGINE = InnoDB DEFAULT CHARSET = latin1;

Error I am getting is:

#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 'DEFAULT CHARSET=latin1' at line 6

View Replies !
Date/Time As A Default Values For A Table Column
I am new to mySQL, so this question might be simple.I want to add a default value to a column that is the current date/time. I am using the mySQL Administrator and will not allow me to use a function like CURRENT_TIMESTAMP() or NOW() as a default value. I used to do this with other databases (I always add a column to all of my tables called InsertDateTime and UpdateDateTime. It helps to track down data entry problems)

View Replies !
Table Names :: Unable To Set A Table With Name 'User'
Is there a problem with naming a table User? I created a table called User in my database and inserting records into it seems to be failing because there is already a table named User that is included in the MySQL database (for login permissions).

View Replies !
Relating User Table With Content Table
I have a mysql table with the curriculum vitae (CV) information of about 50 researchers. I would like each researcher to be able to edit and update his/her information. In order to do this I need to create a membership system for the researchers to access their respective CV page.

Before I do anything I want to plan this out, hopefully with a little help of more experienced developers and programmers. So I am open to any ideas.

This is the thing that stumps me the most right now:

Right now I have a CV table (with all the curriuculum vitae information) and need to create a users table that will somehow link with the CV table. Eventually, what I would like is with a login and password (that they choose) they will automatically open their CV page. These are the questions I have:

What fields in the user table should I use to link the user table with the CV table?
Once that is established, how, by providing their login and password can I direct them to their own page to update? Should one of the fields in one of the tables contain the (already existing) address of their CV page?

View Replies !
How Do I Restore A Table After Its Been "dropped" Using Phpmysql ?
what a tragic mistake i made by clicking on the "drop" button instead of the "empty" button. Now how can i restore that table?

View Replies !
User Table In 5.0
I have a question about the "grande" entries in the 'user' table of
MySql 5.0.0-alpha.What is this?
Also, why are there two rows with "root" (one with localhost and one
with "grande")? Why two entries?

View Replies !
User Table And Version
I am using mysql 3.23.54 that came bundled with RH9. When I do a show =
databases there is no user table, I am working through the reference =
manual for 4.0 is the reason there is no user table because of the =
version? also I have tried updating to version 4.0 using the RPM =
available from the mysql site but on logon the version still says =
3.23.54 and still no user table; any ideas?

View Replies !
Question About User Table In 5.0
I have a question about the "grande" entries in the 'user' table of
MySql 5.0.0-alpha.

What is this?

Also, why are there two rows with "root" (one with localhost and one
with "grande")? Why two entries?

View Replies !
Mysql User Table?
I have number of customer and they should have different access levels, some would access only few pages. I thought if i create a table:users in my database: maindata-> table: loginuser: will solve the problem, but something is not right when i saw the default mysql user table.

maindata->table loginuser: columns are
user id autoincrement
userfname varchar
userlname varchar
email varchar
userurl varchar
accessgroup (tinyint) = 1,2,3,4
Depending on this value they will access the specific url with.

However after reading code below, I am bit confused about storing all users, should i use default mysql user table cause it has got all privaleges by default ie., insert, del, modify etc. and sounds more secured cause if by mistake users can type admin.php url? I am new to all this and sort of confused.

PHP Code: ....

View Replies !
Reset User Table
Im trying to reset all users in my table back to scratch,

I tried first something like this, but it didnt seem to work

mysql_query("UPDATE `$playerdb` (
SET rank='0',
SET clan='0',
SET clan_tres='0',
........

View Replies !
Database - User Table - Propagation
I've started a new website and I want to have a database that works with all my other user tables in my other databases. This is my idea.

Background. Example Setup Tree
--Main Page:
-->Forums
-->Mail
-->Collaboration
-->Bug Reporting
-->Etcetera
-->Etcetera
-->Etcetera

*NOTE: Each subsection has it's own database with their own user tables

-------------------------------------------------------------------------------

UserX visits my site. There's a register screen and UserX performs the standard Registration which is then added to the userdb in the usertable.

I want to run a query that will update all subsequent user tables of their own databases.

So, one query or multiple queries will register UserX's info into all those databases.

Once the person is logged into the site, the don't need to register nor login into the other portions of my site, they just click on 'said' link and have access to that portion of the site.

View Replies !
Specifying A User To Be Able To GRANT On A Specific Table
I tried giving said user GRANT power on a table, but it isn't working.

He currently has SELECT-only on this table, and nothing more.

the command: GRANT GRANT OPTION ON db.table TO username

Any idea why it isn't working?

View Replies !
Creating A User-defined Table
I am wanting to create a user defined table in mySQL. The general idea is that they all would have an asset number (PK). After that, the items can be different.

For instance, I may be keeping track of a table, in paticular it's color, size, and cost. OR I might keep track of a computer system, the OS it has installed, who owns it, etc.

View Replies !
Sorting A Table According To User Criteria.
I was looking for a some kind of simple solution to this issue. The application requires that certain tables should be showed ordered by the user criteria, for example categories. the user will insert a new category and then he could move up or down the item to the position he wants to show it.

In order to do this, I was thinking to add a column, let's call it 'sort_id' this column will save the position of the record. (this is the best i could come up with, I would love any suggestions). This might create some concurrency problems, but since this is an administration module, I don't think more than one would modify the same table at the same time. Anyway, I couldn't find an easy way to insert a new record in the table with the last position + 1.

View Replies !
Mysql User Table For Authentication
What is the best way to store usernames/password information within a mysql Table? Is there a way to encrypt the columns that house this data?

View Replies !
Error 1036: Table 'user' Is Read Only
For some odd reason, the user table that contains all the priveleges and such is read only... I can't write to it... thus I can't change my password or permissions or anything of the sort.

I've tried reinstalling the databases, but no luck, same thing... i checked permissions on /var/lib/mysql/mysql/ and all the files under it and i gave write access 2 mysql.mysql... so i dont know whats going on.

View Replies !
Table Creation Based On User Login
I'm trying to build a website that will allow the addition of users (w/ username, password, etc.).

That seems simple enough.

But is it possible to set something up (in PHP, for example) that will create a new table in the database for each new user?

Ex. John Smith signs up, is verified, and a PHP script (or Java, or whatever) creates a table specifically for him.

I know I'll need a master table of usernames, passwords, etc. These new tables would store certain user-specific data, such as preferences and other data the user might want to restrict access to.

I know I could store all of this information in a master table, but I'm trying to think ahead. Worst case scenario, if there are millions of users (unlikely, but not impossible), I'd hate to have all that data in one table, but if I have to, I can.

View Replies !
Merge Table To Share User Information
I run two different forums and I'm not sure on how to have both forums share the username, posts, and other user information.

Each forum has their own database and I'd like to know if there was a way to merge the user tables instead of all the tables from the database.

View Replies !
Sorting A Table Using A User Defined Function
Here's what I am working on and was hoping for expertise . There's a database with the following table

table1 with columns (date1, extension, date2)

In normal circumstances I want to sort by date2, i.e.

SELECT * FROM table1 SORT BY date2;

However, if date2 is empty, then I want to to "date1 + extension" to be used as the date of comparison. It would be nice if Mysql had a way for the user to specify a user defined comparator that is called during the sort. Or is there a simpler way to achieve the same thing?

Pointers to sections in the manual would be welcome too or examples of code snippets would bring oodles of thanks.

View Replies !
Transfer Data From One Table To Another In Different DB Connected Under Different User
Im using VB.Net and MySQl 5.0 . I have two database each having a lookuptable in it
I m login into each database as different user and both database resides in the same server. During a particular operation I need to get the data from 'lookuptable' in the First DB to 'lookuptable' in the Second DB. Currently I was using looping in the VB.Net part but its taking long time to complete as the data is 2-3lakh. Could anybody please help how to resolve this issue using a "Insert into select query" in MySQl , but please remember The DB are different and the users to connect to db are also diferent.

View Replies !
Configure 2 Sites To Access One User Table
I have two databases on the same server with different domains. I would like both sites to access the same user database table. They have the same fields.

I thought that it might just be done with an mysql command, which will point one table to the other.

View Replies !
Proper Table Setup For Multiple User Types
I have a table called "schedules".

I want to combine 2 types of schedules into this table(if possible) .. class schedules(class_id) .. and individual user schedules(user_id)

With DRY in mind..I don't want to have a class schedules table and user_schedules(as I will have other tables using the same idea as well), as both schedule setups will be the same.

I have heard in the past that it is improper syntax to include both a "class_id" & "user_id" field in each table, where 1 would be null(I.E. a class_id would be set, and user_id would be null).

Is there a simple logic behind this type of thing that I am just completely blind of?

View Replies !
Delete /Change Localhost For Root In User Table
I have updated my Host-Information for root in the users table - and guess what happened - I can't login with root anymore.

What is more - I took as update address something like http://serverbla.com. So guess what, I can't login because of the protocol information.

Since I have a webshop installed on the machine I would like to reset only this information. Is there any chance to do that without crashing the webshop?

View Replies !
Multiple Table Search Based On User Input
I'm working on a database containing our research data. I know very little about PHP, MYSQL, or database structure (except keep like data together in different tables and have a key field in each).

I'm currently working with 3 tables (tbl_2006 and tbl_2007 structures are identical): ....

View Replies !
Populating Matrix Table Based On Books Taken By User
I've been trying to do this for 2 hours now. My noobness in mysql is not letting me get through =(

USERS:
id_user | f_name | l_name
1 | mike | smith
2 | david | bush
etc...

BOOKS:
id_book | s_name | l_name
10 | book 1 | walking together
20 | book 2 | straight path
21 | book 2A| crooked path
etc....

REGISTRY:
id_fk_user | id_fk_book
1 | 10
1 | 21
2 | 10
2 | 20
2 | 21
etc....

Now, I am trying to fill out a table by row using pear's HTML Table that would end up like this:

Name | ID | Book1 | Book2 | Book 2A | etc..
mike smith | 1 | x | | x | etc..
david bush | 2 | x | x | x | etc..

I am having a hard time because the table wants each row's data separetly before it send it to HTML output. And my SQL statement looks like this:

SELECT id_user, f_name, l_name, id_book
FROM USERS, BOOKS, REGISTRY
WHERE id_user = id_fk_user
AND id_book = id_fk_book

which gets me:
1 mike smith 10
1 mike smith 21
2 david bush 10
2 david bush 20
2 david bush 21

View Replies !
#1146 Table 'mysql.user' Doesn't Exist
I am really frustrated, I am trying to learn MYSQL and I can't even create a freaking username. I am trying with the following command ( I googled it):

CREATE USER 'user1'@'localhost' IDENTIFIED BY 'pass1';
I created the database mysql. It comes out with the error when I typed that line:

#1146 - Table 'mysql.user' doesn't exist

Why is it coming up with that error? All I want is create a username for the table mysql. I tried that in both phpmyadmin, and mysql console command.

I am using WAMP 2.0 on my Windows XP computer.

View Replies !
Finding Field In Table That Matches User Supplied Input
I've come across match/against, field, and locate. I've been unable to use these to match against columns.

As an example, I have a table with two columns, an index number and a domain name. The user supplies a FQDN (fully qualified domain name). I would like to compare all of the domainname rows to see if they match against the FQDN and return a go/no-go value.

The match function is close, but works in reverse. I cannot see a way to get locate or field to work with fields.

View Replies !
One Big Table Or A Table Per User
I'm stuck wondering if I should use one big table to store userdata input (which could amount to a million records/year) or make a different table for each user?

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 !
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 !
Retrive Category Names Where Categoryid Is Different From User To User
I am trying to retrive category names where categoryid is different from user to user

I know LIKE works with one int(1), but I want it to work with more ints (1,3,5)
SELECT * FROM `categories` WHERE categoryid LIKE (1) Working

SELECT * FROM `categories` WHERE categoryid LIKE ( 1, 5 ) Not working

View Replies !

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