Changing A Default Value
i have a column that originally assigned a default integer value (1) to a column that contains about 1000 records. now, i'd like to replace all those with an incremented value. i figured out how to change it so newly added data is incremented, but cant seem to figure out the command to go back and change all data from the beginning so that it is now incremented.
View Complete Forum Thread with Replies
Related Forum Messages:
Changing Default Security Settings
MySql is running fine. Installed Joomla fine. phpMyAdmin gives the following warning: "Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole." So, how to fix this in OS X? When I changed the localhost password in MAMP before nothing worked anymore.
View Replies !
Changing Default Acceptable Number Of Connections
How can I change default number of acceptable connections? I am getting an error when deploying along with Java Web Application. Exception :No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )) I tried all possible ways from Java Side for checking all the connections are closed when done etc. I am still getting the same error. I just want to cross check if mySQL has got any default number of aconnections that it accepts e.g. Max 50 connections at a time and if it goes beyound that then it will give error... I just want to know if there is any setting which I can modify. If yes then how do I modify on Red Hat?
View Replies !
Changing The Default Time Zone Of A Current Timestamp In MySQL
I have a shared host which uses the time zone MST (GMT-7), and I cannot seem to change the time zone for my own database. What is the best way to create a timestamp field in a table that has the default value be the current time in GMT-0? Is setting the default value of the timestamp field to "DATE_SUB(NOW(), INTERVAL -7 HOUR)"
View Replies !
Changing NOW()
Is it possible to change NOW() to a different time zone? Reason why I need this is my server is in America and I live in Australia, I know how to do it though php but I would have to use the date function, just thought I would check to see if it is possible to do it in mysql before starting on the php way.
View Replies !
Changing Max
I'm using MySQL server, community edition 5.0.18-nt installed on localhost. I'm using the Dot Net connector drivers on client side within a Dotnet application. I am migrating selected parts of my Microsoft SQL Server database to mysql. One of the tables is my images table which contains BLOB fields that may be quite large. While trying to import records to this table, I receive the error "Unable to write to stream". A google search revealed the following page http://forums.mysql.com/read.php?38,47230,47230 I fixed it with "set global max_allowed_packet=268435456;" How can i view what the current max_allowed_packet size is? At some time in the near future we'll be using a MySQL server version of our database in the field. It's very very likely that I'll completely forget that this value needs changing when MySQL is installed on client machines. If this value CAN be set in an option file that I can add to an install, which one is it please?.
View Replies !
Changing .cnf
I have been advised by a tech to change the my.cnf settings. Do I have to stop mysql before I change the .cnf file? Or can I change the config settings and then restart it... How do I stop mysql? How do I restart mysql? Code:
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 !
Changing DATADIR
I installed MySql with the default settings. But I'd like now to change the place where I keep my data files. I tried changing the DATADIR parameter in /etc/my.cfg but the server won't start. Is there any way to change only the data directory from /var/lib/mysql to /otherplace/mysql and leave everything else in it's place?
View Replies !
Changing Charset
Is there a way to globally overwride the charset in tables? Somehow I got latin-1 from phpmyadmin. Otherwise I'll loop through the tables and fields and change them all using varchar type.
View Replies !
Changing Column
How can I create a query that will take values in columns and give me them as additional rows instead? For example, I need to query a table like this: id, A, B, C 1, 11, 12, 13 2, 14, 15, 16 3, 17, 18, 19 ... and get a result like this: id, label, value 1, A, 11 2, B, 12 3, C, 13 4, A, 14 5, B, 15 6, C, 16 7, A, 17 8, B, 18 9, C, 19 Anyone know how to do this?
View Replies !
Changing Datatype
I have a table - lets call it "TABLE". I have a column in TABLE called "COUNT", which has a datatype of "TEXT". currently, TABLE is heavily populated with records. Column COUNT is populated with Integers. I want to change the datatype of COUNT to "BIGINT" w/o losing any of the data.
View Replies !
Changing Date
I have a table 'test' that has the date in a varchar field formatted like this: 12/05/83. I need to switch the date to this: 1983-12-05. This is what I have so far: UPDATE test SET dateEntry = CONCAT( '19' , SUBSTRING_INDEX(dateEntry, '/', -1), '-', SUBSTRING_INDEX(dateEntry, '/', 2) ) which gives me: 1983-12/05. I can't figure out how to change the / to a - Is this a two-step conversion or is there a way to do it in one UPDATE statement?
View Replies !
Changing The Value In A Specific Row
i have a forum that i am trying to add a username kind of thing to. what i have done so far is to set up a table that has three coloumns in it, USERNAME, PASSWORD, and STAT, of which stat is a boolean value that i use to determine if they are logged in or not (what i intend for it to be), and the other two are pretty self explanatory. my question is is there a way for me to get into this specific row and change the value stored inside STAT, or is my only choice to completely delete this row then re-enter it into the table everytime stat has to change? thanks guys. btw good forum you have here
View Replies !
Changing A Substring
i need some help with a sql query that will replace a string in a bunch of fields. for example the select that shows the fields is which need changing is "SELECT link FROM links WHERE like LIKE '%ID123%'" i want to change all of the 'ID123' occurances to a different string. the urls are all different but the 'ID123' part is the same in all of them. so keep the url but change the ID123 but how can i do this?
View Replies !
Index: Changing The Name
Is there an easy way to change the name of an index, without having to drop it and create a new one? I know how to find the index name in the information_schema.statistics table, but these seems more reflective. If I were to change the name here, that doesn't really change the name of the index, does it? Is there a SQL statement to change the name of an index from one name to another?
View Replies !
Results Keep Changing
I have a site which lists the top 3 best pay sites. Yesterday when i checked the top 3's (there are 3 of them) i copy-pasted them in a document. After pressing refresh multiple times it stayed the same. However the next day when i checked the results had changed and no new votes had taken place. This is my code: SELECT service, count(service) voteQty, AVG(rating) AS rating FROM rate WHERE type = 'pt' GROUP BY service ORDER BY rating DESC, voteQty DESC LIMIT 3 thats for one of the 3 top 3's the other 2 are almost the same. Why do my results keep changing?
View Replies !
Dates Not Changing
I know mySQL is supposed to accept years up to like 9999 or something. I have a variable thats stored as a DATE. The problem is if you enter a date in the future, it resets the value to 0000-00-00 but if I put in todays date or an earlier date it does not change it. Why?
View Replies !
Changing MySQL.cnf
I want to change the values of query_cache and key_buffer in Mysql.cnf. Do I need to restart the dDb or is there a way to change this dynamically?
View Replies !
Changing A NULL Value
First time posting and I'm a little stuck - the following code returns all the values I want where the column "ViewID" is NULL. SELECT * FROM ceta.resource r LEFT OUTER JOIN ceta.resourceview rv ON r.resourceID=rv.resourceID WHERE viewID IS NULL; However, I'm looking to replace these NULL values with another value eg: 1041 I've tried the following: SELECT * FROM ceta.resource r LEFT OUTER JOIN ceta.resourceview rv ON r.resourceID=rv.resourceID WHERE viewID IS NULL SET viewID IN NULL = '1041';
View Replies !
Changing The Backslash
I would like to disable the backslash behavior to all my SQL strings. For sample: UPDATE USER SET DEFAULT_FOLDER = 'C:TEMP' (desirable) instead UPDATE USER SET DEFAULT_FOLDER = 'C:TEMP' (not desirable) I would like to treat special characters like in MSSQL, because all modules of my program use that. I'm doing a migration work
View Replies !
Changing Username
I went to mysqladmin -u root password and changed to other username, e.g. daniel. Now it is daniel without password. Can I change it back to root for some reasons I suspect that my wamp phpmyadmin doesn't allow me privilige access. I tried using the method I used to change it but can't.
View Replies !
Changing Platforms
Our company has been running MySQL 4.1 under MacOSX for about 3 years, hosting 6 InnoDB databases (semi-large, around 65GB total). The performance of the PowerPC Xserve is starting to slow us down, and we have just purchased a new server. However it will be an Intel / Windows based server. We run 'mysqldumps' every night and I have restored them them to other OSX servers in the past. However now that its getting closer to production time, I've stumbled accross some "Case Sensitivity" questions about Windows. If I understand correctly MacOSX (10.4) defaults to "lower_case_table_names=2" The MacOSX file-system is NOT case-sensitive but the table names are created that way, but NOT actually stored/retrieved that way. When I do a 'show tables;' they are definitely 'Mixed Case'. Also, I believe Windows defaults to "lowers_case_names=1", and the filesystem is NOT case-sensitive, and the tables are NOT case-sensitive. On to the point.... When I restore the dumps onto Windows the tablenames become all lowercase. This could be a potential problem, as I'm not sure how the software we use references the tables. If I set lower_case_names=2 on windows and restore the mysqldumps, the table-names have the same 'Mixed Case' as they do on the mac ( show tables; ).
View Replies !
About Changing Password
I ran; mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost' IDENTIFIED BY 'oldpassword'; creating password Now I need changing its password whether to run; mysql> UPDATE user SET password=PASSWORD('newpassword') WHERE user="'mail_admin'@'localhost'"; Then where to put mail.* ? It is NOT a database.
View Replies !
Changing Date_format
Using the following syntax i can add date in YYYY-MM-DD format. INSERT INTO news_table (s_time,text_sub) VALUES (current_date(),'text'); Question: How can i change the format to DD-MM-YYYY? INSERT INTO news_table (s_time,text_sub) VALUES (DATE_FORMAT(current_date(),%d %M %Y),'text') -- got error...
View Replies !
Changing Column &
I want to change one of my colums from a date type to a varchar how can i do this. i assume i use the update line! Example: UPDATE table name SET column name = 'insert change here' WHERE modifier = 'insert modifier specific here' But obviously that won't quite work! If someone coudl let me know the actual line i need i'd apreciate it!
View Replies !
Changing TIMESTAMP
my guest book is using 24hr clock how could i edit my database time stamp to show DATE then 3:00pm instead of 10.30.2005 - 17:42:02 o'clock
View Replies !
Changing Host Name
Mysqld is configured and running, And my question is, If i change my host name how mysql is affected, which tables are affected, etc?
View Replies !
Changing Values From 0 To 1
I would like to change ONLY the 0 values to 1 on a nuke_users table, row user_level. This command will change all values (UPDATE nuke_users SET user_level = 1 WHERE 1;) but I only want to change the (zero) values to 1 (one) and keep the other values as -1, 3, etc.
View Replies !
Clause Changing
What is a difference between? SELECT Sect.* FROM {{LongExpression}} WHERE (1=1 or NULL) GROUP BY Sect.ID; and SELECT Sect.* FROM {{LongExpression}} WHERE (1=1) GROUP BY Sect.ID; {{LongExpression}} == Section Sect LEFT JOIN A ON A.Section=Sect.ID LEFT JOIN Br B ON B.AID=A.ID LEFT JOIN Permission Perm ON Perm.BrID=B.ID LEFT JOIN map S ON S.ID=Sect.SystemID LEFT JOIN Un U ON (B.ID=U.T AND U.User=1) In the first case I get no row at all, whereas in the second case, I get 8 (the expected amount).
View Replies !
Changing The Timezone
Ok, right now im setting up a news script where it has the title, post, userid, and date. Now I have it set up to select the date and format it so it shows 02-21-2005 05:25:00 PM. Now for each user, I set up a timezone offset, so they can change what the date/time reads. Right now I have this as a MySQL command: SELECT DATE_FORMAT(post_date, '%m-%d-%Y %h:%i:%s %p') AS post_date, Can anyone help me to get that auto changed to like a EST timezone (-5) or something. I want to make the script user friendly to people of all areas around the world.
View Replies !
Changing The Ordering
Sadly, this isn't one that can be answered simply by changing ORDER BY field DESC to ORDER BY field ASC. What I need to do is to be able to display a list of items in an arbitrary order that can be changed, e.g., A B C D might need to change to C B D A I'm thinking that the best way to approach this would be to add another column sort_order that contains integer values which could then be used in an ORDER BY clause on my SELECT statements. Anyone else have any better ideas? I've done it this way before and it does work, I'm just wonder if there's some utterly brilliant solution out there that doesn't require additional metadata.
View Replies !
Changing Value After 30 Seconds?
Is there a way to change a value after 30 seconds of it being changed? So if I change it to 1 from an external script, I want to 30 seconds later to change to 0. Is this possible without a script (or a script in sql of some sort?)?
View Replies !
Changing A Query To Use BETWEEN?
I'm trying to convert my SQL query so I can only show the results which are between a from date and a to date? Heres the original... SELECT Approve, ID, Name FROM PROVIDER WHERE Approve = Ƈ' ORDER BY ID ASC LIMIT $from, $max_results Heres what I want to do.. SELECT Approve, ID, Name, From, To FROM PROVIDER WHERE Availibility BETWEEN From AND To AND Approve = Ƈ' ORDER BY ID ASC LIMIT $from, $max_results
View Replies !
Changing Column Name To New Col Name
I looked up the MySQL for altering a column name and came up with the following -- ALTER TABLE PartnoLinkCat_assoc CHANGE 110684 PartNo NOT NULL; 110684 = old col name PartNo = new col name However, phpMyAdmin gives me a 1064 error. I don't know what I'm doing wrong.
View Replies !
Changing My Variables
I'm really nubbin at this and just recently starting looking at MSQL database things. The main question is can I change the Variables of my database? Its a MySQL database...at I want to change query_cache_limit = 1,048,576 to 62 million or whatever, also have a bunch of other values I want to change.
View Replies !
Changing ENUM Values
So I've got fairly big sized table (20,000 records) which has an ENUM row. I need to change the name of one of the ENUM options. For example, if the ENUM value was 'blue' before, it needs to be 'purple' now. What's the best way to do this?
View Replies !
Changing An Individual Field
Suppose I have a table, and it is populated with many rows already. However, I realise I structured something wrong in my table. I dont want to have to go back and repopulate the entire table. For example, suppose I have a field: "inoutstatus INTEGER(3)," Which I now realize should be : "inoutstatus CHAR(1)," Is there a way I can change the entire table without losing the other records in each row? I can go back in and repopulate the inoutstatus fields, but I really would like to know if there is merely some type of SQL command
View Replies !
Changing Character In Field
I have a table that one colunm contains street addresses... some of the addresses contain suite or apartment numbers...designated by a # followed by a number or letter... What I need to do is change (all) the # to the word "Unit" I have tried using UPDATE but to no avail... no errors but this does not work (UPDATE list SET address = 'Unit' WHERE address = '#') can someone help? can this be done with a query?
View Replies !
Changing Column Order
I have a bunch of data in a MySQL table, and I want to export it to Excel for somebody else. The problem is, it's really not at all in the order that I'd like to export it in. If it were just a one-time thing, I could export it and then make the change in Excel itself, but I actually want to export it on a regular basis. How can I either A) Change the column order in MySQL (despite the fact that this has "no meaning") or B) Change the order in which it's exported? I did a search on this but people seemed not to consider it important because they viewed it as irrelevant. However, I think it's relevant for exporting to Excel
View Replies !
Changing Commas By Joins
I've just installed 5.0 on a testing server. To get mysql service started I had to comment out basedir=/var/lib in my.conf, create /var/run/mysql dir and to chown it to mysql.mysql There's no command mysql_upgrade installed in this FC3 to execute. I found that in certain php script there was no difference changing commas by joins (same results)Here is the query from which I get 0 results against more than one in production server (V4.1) SELECT * FROM table1 INNER JOIN table2 ON table1.id=table2.id WHERE MATCH(table1.keys, table1.text) AGAINST('$morewords') AND table2.ttt<>'MNT'
View Replies !
Changing Ft_min_word_len Variable
I've built a search engine for my website and made the mysql field FULLTEXT and wrote the queries and everything is fine, the problem is when users search for 3-letters words they get no results, the MySQL system variable (( ft_min_word_len )) is responsible for that as it's set to 4, i've tried alot of variations and googled to change this number to 3 but no luck, i own the server and has full access to it, please help in modifying this variable, Thanks in advance. P.S.: i tried to add [mysql] ft_min_word_len=3 in etc/my.cnf but it says unknown variable ft_min_word_len
View Replies !
|