Read-only Tables
Is there a way to mark a table as read-only (after inserting some initial data, of course)?
I'd like to do it for optimization reasons - hoping that mysql could take advantage of the knowledge it's read-only, for caching, etc.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Read Only Tables
I log on as a user who has select, insert, update, delete privilegies but when i'm trying to for example insert row in my table myadmin reports me that the table is read only. where can I as a root change this and what are the options?
Editing Read Only Tables
ive got a database in phpmyadmin..i need to change a value in a coumn in a table..but when i do so, the following error message would show up: Quote: MySQL said: Documentation #1036 - Table 'table' is read only how can i deal with it
How Can I Set The Login To Read 2 Different Database Tables?
I need to enable my login function to read data from 2 different tables in my database, the discussion forum table and the customer table. Right now, visitors can only login as customers because the login function is setup to read from the customer table, and not both of the tables. I had a few website developers do the site for me, so I have tried to learn some javascript tutorials; I have learned the basics, but I cannot seem to figure out how to do this. I think it has to do with an "or" function or "if, then" statement. How can I set it up so that the username and password can be read from either of the tables? The current setup is listed below:
How To Read Composite Values In Tables
i have three table codes -------------it conatins post codes of different regisons day-------------------------it contains the day on which delivery can be made e,g post code 44444 will be served on mon , tue or day 1 day 2 time--------------------it contains the time on which delivery will be made on certain days e,g on monday time is 2-5 , 6-9 , 11-12 and so on now i want to display all data in the form of report but i don't know how to do it
Read From MySQL
I installed appache server and php and work great.. But i cant read data from my sql . I use this code to connect to connect to mySQL server:localHost username:root password: **** // Connect to the database server $dbcnx = @mysql_connect('localhost', 'root', 'password'); if (!$dbcnx) { die( '<p>Unable to connect to the ' . 'database server at this time.</p>' ); } ... ...... Should i create another account in mySQL? .or the php can not communicate with mySQL ?''
How Do I Read The Log-bin File?
Does anyone know how to read the binary log from a client workstation? The log is named hostname-bin.001 and when I open the file it is unreadable (obviously because it is in binary). So making a shortcut to that file will not do the trick. How can I open the file via a mysql command prompt on a client PC?
How To Lock A Max ID From Being Read
Basically what I want to do is read the maximum id_B from some table with id_A = 5 and insert a new row with a new id_B. While I do this I don't want anyone else to be able to insert a new row with id_A = 5. If I do this: SET AUTOCOMMIT=0; SELECT MAX(id_B) FROM table WHERE id_A = '5' LOCK IN SHARE MODE; // do php code here to increment MAX(id_B) by 1 and save it to $new_id_B INSERT INTO table (id_A, id_B) VALUES ('5', '$new_id_B') COMMIT; Would this prevent other users from inserting a new record with id_A = 5, while I'm adding a new record with id_A = 5.
Read Default Value
I have table with simple data. all of fields have default value how to read this default value, using php
How To Read Log Files
I running on Win2K3 and need to know the basics of mySql system health logs (their location, their expected contents and format) and any other logs that might help track down problems when mySql crashes. I've seen that it will log EventViewer events and that within the C:Program FilesMySQLMySQL Server 5.0data directory there are some logs. I've been able to read the .err log since it's text but the other logs are binary. Do I have to use a cmdline app within the mySql distriubtion to read the binary files? Or, is this a well documented format and there are several 3rd party utilities out there that will parse/display these logs. In general, where does mySql maintain its log files, does it generate separate log files per database and what are some common applications that I need to get familiar with to view the contents of these files?
Table Is Read Only
I've upgraded a server from RHEL4 to RHEL5, and in the process gone from 4.1 to 5.0. I copied over all of the database files, adjusted permissions, and ran mysql_upgrade. It's a very simple application that needs no security, so it's running without passwords. The application works fine reading, but will not write to the table: [root@chekov etc]# ip_age_off_autoblock iptables: Bad rule (does a matching rule exist in that chain?) iptables: Bad rule (does a matching rule exist in that chain?) DBD::mysql::st execute failed: Table 'addresses' is read only at /usr/local/scri pts/ip_age_off_autoblock line 47. Unable to execute at /usr/local/scripts/ip_age_off_autoblock line 47. I've tried granting privleges to anonymous users: mysql> grant select,insert,update,delete,create,drop,references,index,alter on *.* to ''; to no avail. Absolutely nothing shows up in the log file.
Read Out An AUTO_INCREMENT-ed Value
The first column of my table is AUTO_INCREMENT. I fill my table with 5 records with a blanco value in their first field. The first column of my table will then hold the values 1,2,3,4,5 (top>down). Then I erase those 5. Then I add a new record with a blanco first value. It will get number 6. My problem in this scenario: I want to read out this number 6 before I will insert that record. Is that possible?
How To Read Phpbb
php file is loaded as codes on windows, but when u upload it on web u get the codes showed as image and stuff, so my question is, when using local host (windows xp) what prog or how i can see the php files not as codes/source when opening but as image or table or whatever.
Table Is Read Only
i transfer my mysql database in windows into linux by copy and paste it.when i want to update table record,it promt an error msg: Error Code : 1036 Table 'ardi02' is read only (2 ms taken).
Read The .err File
Working on installation in Mac OSX 10.4. Need to read the .err file, but don't know how to find it. If you can help, please show the path from from the 'top' i.e. /usr/local/mysql/ and the rest of the path.
Table Is Read Only
I backed up my tables, formated my computer, and reinstalled. Then I reinstalled mysql and capied the files back in. Now every time I try to do any table operations. I get "Table is read only". So I tired palying with the file permissions.. They are rw for user and group.. and they are all owned by mysql and the mysql group.
MySqlDataReader.Read()
Then you ask the Mysql .Net Connector Reader to Read forward is it moving a server side cursor forward? Or is it just moving forward in a cache of the query result that is already on the client? I assume(hope) it is the latter but just asking.
Can't Read Dir Of './mysql/'
I am currently using MySQL under Mandrake Linux 10.1 and have an error (see the title). I have an error message when I want to see All the databases into my Server. I am using PHPMyAdmin.
Read In A .sql File
I have a large SQL file that contains a bunch of create table statements.How do I get mysql to read in this file and process the sql. =20.I am not thinking load data infile because it isn't text
Not Allowing To Read Files
I have program with data accessed by MySQL. In my assume, I copy program and its data files to my friends, and they run program with pleased faces. And now, the first friend wants to delete all program related data files and copy program related data files from second friend(or he can also get any program formatted data files) and save them into data folder. My problem: the first friend can run program with only my data files; he can get any data files from anywhere and save them into data folder, but program won't be allowed to read these data. Does everyone have some good ideads?
Read Size Of Field
Given a table like this, where X can be any size: table { name int(X) } Is it possible to get the value of X?
MySql Write Vs Read
Essentially I am faced with a design choice; have an oft run (modifiable) query run every time any user wants to run it, comparing criteria againt each and every user in the table and delviering list OR saving that list (user/user/) so the next time all that needs to be queried is the existence of a record in the table. The basic tradeoff; version 1 there are many simultaneous queries of the user db on complex search criteria; version 2 there are fewer but their are as many far more simple queries to a much larger table, not to mention many writes to same to keep the table current. I know this is pretty vague, but I was wondering if in general there is an area that mysql excels in vis a vis complex query smaller tables simple query larger tables. Question 2 is there anyway to guestiate the search/write times of a user log in to both query and update? #Records, fields, etc? I'd like to keep log in to < 10 seconds max.
Creating Read Only User
When looking over the instructions for phpMyAdmin they want a read-only user. What GRANT permissions do I need to assign so a user has just read-only rights?
Write Once Read Many Field
I am designing a database and one of the requirements my client has is that once data is entered into certain fields it cannot, under any circumstances, be changed. Is it possible to create a write once read many (WORM) field in MySQL directly?
Read-only TIMESTAMP Field
I need a table with TIMESTAMP field which must be always set to a CREATE server time (so the == CURRENT_TIMESTAMP). How do I make it read only? I.e. make user unable to override the default value (CURRENT_TIMESTAMP) on CREATE and UPDATE. Is it the Q of user permissions? If yes, how to set 'em correctly to allow create/update but allow only to read timestamp?
First Field Isn't Read Using SELECT
I am trying to gather information from a dbase, displaying it as I go. The script works fine except the first field that matches the criteria isn't read or displayed. For example: On this page I check to see if a session variable 'tripNumb' is set. If it isn't, it goes to the dbase and gets the last trip number and adds one to it. The problem is that if there is only one field in the dbase it doesn't read it. Code:
Can SQL Read From A File Or List
I'd like to do a select statement that would substitute variables from a file containing a list of strings, or a list of strings right on the command line. Here's my pseudo code: SELECT {some value from my list, table or whatever} FROM {some list of tables in a file or other table etc}..
Read Ibdata1 Or Ib_logfile1
Is there a way to read the ibdata1 or ib_logfile1 files? I'm looking for some information. It doesn't have to be complete but wanted to take a look. It's all binary right now and wondered how to convert to .txt or something that i can read.
Read Primary Key While Entering A New Row
I have a website with a form on it. Upon pressing submit, the information gets entered into the database on a new row. Each row is numbered with auto_increment (it's the Primary key). The auto_incremented field is called the ID. When the user submits his information, I would like an automatic email to get sent to his email with his unique ID number and a recap of this information. How can I do this? Basically it seems to me that all I need to know is the command to be able to read information off of the row that you're currently putting information on. The only way I can think of to do this is to have the form input all the information, then close that connection and start a new one in which it searches for the row that contains all that information and that way I can get it to read the ID then. Is there a shorter way?
Table Is Read Only Error
We recently started using MySql as the db behind some java and cold fusion applications. A couple times we've gotten an error that says the table is read only. Stopping services and closing all open sessions does not correct the problem. We use Mysql Control Center as our GUI, and the repair functions there also give us the same error. The only thing that seems to work is rebooting the server. Anyone run across this before?
How To Read A File Into Mysql
i have created a output file from oracle which contains insert statements like insert into tms.tms_rem_exclusion_list values (3337) insert into tms.tms_rem_exclusion_list values (4175) insert into tms.tms_rem_exclusion_list values (4227) iam new to mysql and someone told me that if i create such a file i can import this data into the mysql table at the mysql prompt like mysql> tms_rem_exclusion_list < test.sql; (name of the above file) but iam getting this: ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'tms_rem_excl usion_list < test.sql' at line 1 first of all i am not sure where to keep the test.sql file ie in which directory so i kept it under the scripts folder.
Creating A Queue Read-out.
I am trying to create *what should be* a simple result of where a person is in line, but I am having a lot of trouble. I have spent hours searching, and for one thing I don't even know what to search for. So here's what I am trying to do... Let's say I have rows 1-10 in a database and rows 2,5,6,9, & 10 are all marked with '0' and the others with '1'. If my $ID is '6', then my code would print out < 3 of 5 >. Here is the code that I do have... $num_in_line = (I don't know what query to put here.) $of_total = mysql_result(mysql_query("SELECT COUNT(ID) FROM all_programs WHERE list = '0'"),0); echo $num_in_line.' of '.$of_total;
Read Back Up File
I got this error. shell> mysql -e "source /var/lib/mysql/test.sql" backuptest ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'backuptest'
READ A TEXT FILENAME
Since a text file can be loaded in the MySQL, I feel that there is a way MySQL will be able to read a text file name. Any idea how to do that? And after reading the text file name, how do i insert it in the column.
Read Text From A File
I have a text file which contains the following data 1&david&0248814&software engg&1973 2&thomas&8475623&commerse&1965 I have created a table <info> with the attributes nr name reg_nr sub born_yr I need to somehow read the data from the file n insert them into the table attributes... does anyone over here know how could this be done ? to insert the data to the table could be done with insert into <table> values <value> but the problem is how can i read it from the file...leaving the '&' sign ?
Read From Merge Results
is there a way in MySQL to read in the records of a table and to package duplicates into one value : |id |type |subType | Category | | 00000000001 |Accommodation | Guest House | 3Star | | 00000000002 |Accommodation | Bed and Breakfast| approved| can it be outputted like this: Accommodation -> Guest House -> 3Star -> Bed and Breakfast-> Approved I am still trying to merge the output from this query into a triple combo.
How To Dump The Database And Read It Back In?
Our database just slowed down radically. Certain queries drive CPU utilization through the roof. This happened once before, and the technican simply dumped the data to disk and then played it back in. This seemed to correct database corruption. After than, the database went back to normal performance. Does anyone know how to do this?
Read Mysql Dump File?
I am trying to read a mysql dump file that I was given from a mysql dump file into my mysql server, I am using the following command at the mysql command line and get the following error: mysql> items < c:ookingsitems.mtsql ERROR: Unknown command ''. ERROR: Unknown command 'i'. Does anyone know what this means?
No Read Or Write Between INSERT And UPDATE
I am using mysql with the InnoDB engine. I wrote a perl script that first selects something from a table, and then updates a second table based on the select from the first table. I need to make sure that there is no read or write to the tables while my script performs the insert and update. I looked at http://dev.mysql.com/doc/refman/4.1/en/lock-tables.html and it says this: --------------------------------------------------------- If you are using a storage engine in MySQL that does not support transactions, you must use LOCK TABLES if you want to ensure that no other thread comes between a SELECT and an UPDATE. The example shown here requires LOCK TABLES to execute safely: LOCK TABLES trans READ, customer WRITE; SELECT SUM(value) FROM trans WHERE customer_id=some_id; UPDATE customer SET total_value=sum_from_previous_statement WHERE customer_id=some_id; UNLOCK TABLES; Without LOCK TABLES, it is possible that another thread might insert a new row in the trans table between execution of the SELECT and UPDATE statements. --------------------------------------------------------- However, I am using InnoDB and it DOES support transaction. So, does that mean that even if I don't lock my tables, it will still work? If not, what do I need to do?
Read Mysql Dump File?
I am trying to read a mysql dump file that I was given from a mysql dump file into my mysql server, I am using the following command at the mysql command line and get the following error: mysql> items < c:ookingsitems.mtsql ERROR: Unknown command ''. ERROR: Unknown command 'i'. Does anyone know what this means?
Still Read-only Table After Granting All Privileges
I copied a table from a server onto my test server, and wish to alter it somewhat. I attempted to ADD COLUMN via the ALTER TABLE command, and got an error: ERROR 1036: Table 'TABLE' is read only. So I ensured all privileges, by executing the GRANT command: GRANT ALL PRIVILEGES ON *.* to root@localhost IDENTIFIED BY 'pword'; which executed fine. I then tried to ALTER TABLE again, but am still getting the above error. Any ideas folks?
Store And Read Chinese Characters
I'm writing a vbscript application that reads UTF-8 XML containing Chinese characters. Any suggestions how to store these characters in MySql 4.0.x ? Do I need to set a special encoding such as Big5 on the database ? Does MySql support storing UTF-8 ? If so what data types / encoding do I need to use ? Are there any special considerations for using MySql/ODBC and ADO to get and put the data.
Read Only Rights For Someone Connecting With ODBC
I would like to give someone access to my database read only rights. This person will be connecting through ODBC. With the MYSQL Administrator program I made a user up for this. (I am assuming I do need to make a user up for him to connect by ODBC) I also set his rights to SELECT only. Do I need to give this user more rights for him just to be able to read data in my database?
Query That Finds Last Row In Relation To Current Row (read For More)
It's been almost a year since I last did SQL and I can't for the life of me figure out how to do this again. Pretty much I have a table like so: id | ip | time I want to get a result set that contains each unique ip, how many times it appears in the table, and the last time it appears.
MySQL Query Browser. Result Set Read Only
I'm developing a client/server application with mySQL. The mysql server (plus database) is on a Windows XP LAN pc in another office. I installed mySQL several months ago and have been using Administrator and Querybrowser locally on a regular basis to administer and fiddle with the database on the other pc. I don't believe I've changed any settings. I noticed a couple of weeks ago that if I tried to edit table data from Administrator, Query browser wouldnt display but would remain in task manager process list forever. If I did the same directly from query browser I would receive a result set ready to edit.....
Can Seqouia/c-jdbc Segregate Read & Write DBs ?
I haven't started using Seqouia/C-jdbc but I am probing the ability to do something like this: Controller CW has 2 controllers under it - C1 & C2. C1 is local and has a host HA with X.db's tables t1 & t2. C2 is remote and has a host HB also with X.db's tables t1 & t2. Controller CR has 2 controllers under it - C3 & C4. C3 is local and has a host HC with X.db's tables t1 & t2. C4 is remote and has a host HD also with X.db's tables t1 & t2. X.db is MySql type, from experience I've found that MySQL is better off doing either only writes or only reads. So I want to segregate my read and write stores. Hence, HA & HB are meant for writing into, while HC & HD are meant for reading. Now writes coming to CW should be treated like transactions which land up on local and remote X.db. These are my WRITE-ONLY-DBs. Likewise I want reads to goto CR for load balancing with higher priority to read from HC than HD. Questions: (a) Can c-jdbc help in replication of data between HA-HC and HB-HD ? Which component would help to set this up ? Or do I need to go for out-of-band MySQL replication ? (b) Is this configuration optimal for high scalability or availability ? Should I have added contollers horizontally instead of vertically ? (c) Also, looks like I'd have to write an app to direct writes to CW and read to CR. Or is there a way to obviate that with the controller settings itself ?
Create Temporary Table With Read Permissions Only
In one database I made a query like this create temporary table tempT type=heap select * from orig_table1; insert into tempT select * from table2; SELECT column1, column2, column3, sum(column4) as sumOfColumn4, etc, WHERE date = 20070306 and name = "jan" GROUP BY Column4 order by name desc; drop table tempT; But on another server I only have read permissions. Is there a trick to do such a thing when you only have read permissions. Can I add the output in a variable and then merge the second select in the variable and if necessary empty the variable?
|