MySQL city database?

I need a MySQL worldwide city database. Anyone know where to find a similar sql dump

Posted On: Thursday 25th of October 2012 11:16:34 PM Total Views:  224
View Complete with Replies

Related Messages:

mysql query help required   (420 Views)
In one table there are some records for a field: option=com_content&id=1&task=view option=com_content&id=10&task=view option=com_content&id=91&task=view and so on. How to write a query to get the records only when id=1
mysql view is not activated on my host because ...   (295 Views)
I have chat with my client and asking him to activate "view" in mysql. the client then ask the web host's customer service, and they told him that "As we do provide or create mysql user and add previllages. We can not activate such function for you" may i know why "view" is disabled on shared web hosting
host mysql server has innoDB enabled but can create innodb tables   (238 Views)
My host indicates, and I have verified on phpmyadmin storage engines, that InnoDB is enabled. I am installing a program that checks for it in a database I already created and says, "InnoDB is not enabled in the database Could not determine if mysql has innodb support." How do I fix this
LAST_INSERT_ID() irregularities on mysqlclients   (209 Views)
Ran an insert on a table but LAST_INSERT_ID() returned zero. (USING PHPMYADMIN & MYSQL QUERY BROWSER) INSERT INTO members(displayname) values ('dele454'); MemberID is on AUTO_INCREMENT. SELECT LAST_INSERT_ID() AS ID; - returns zero But on using the mysql console i does return the last inserted id: mysql> SELECT displayname FROM mydb.members m where memberid=(select LAST_INSERT_ID()); +-------------+ | displayname | +-------------+ | dele454 | +-------------+ 1 row in set (0.02 sec) Why this irregular/different result on clients Anyone knows
Programs to work with mysql.   (293 Views)
I realize that this thread is probably below most if not every mysql user. But I am a little stumped. I purchased a coded website that uses mysql. Now I've been working through it and understand a lot about how the website works (this is just a hobby so i don't have formal coding experience), but have a few questions: Right now my server uses phpmyadmin to connect to the mysql. I would like to be able to download and view the sql file (kind of like in an excel format) then reupload the changes (deleting rows and changing values and such). What program do you use to view and edit sql files If there is a relatively inexpensive program that would be appreciated.Also, is there a program that connects directly to the mysql database so you don't have to export the sql, alter it, import it Or do i have to do everything through phpmyadmin
mysql random field (condition, multiple table, compare)   (301 Views)
Assume i have two tables. "accounts" and "accounts_logs" "accounts" (accid, type) "accounts_log" (accid, ip, timestamp) Here i want to choose a radom 3 accids from "accounts" if available, but each of them should be compared with "accounts_log". Lests say a one of the accid chose is A1, then take users IP and current time - time(). now compare A1 exists in "accounts_log" with the ip, this can exist multiple times but pick one with latest timestamp. Compare the difference in hours in the timestamp and current time, if its less than 12 hours then choose a different accid from "accounts" which goes through the same check, and while taking new accid from "accounts" or if it is greater than 12 hours continue to be A1, this is same even if there is no entries of A1 in "accounts_log". I hope my explanation was enough. I been trying for weeks and yet can't seem to find a solution. I'll summarize the steps 1) have to take 3 random `accid` from `accounts` with `type`='normal' 2) while taking, check each `accid` from `accounts` exists in `accid` feild of table `account_logs` with number '123' in `ip` field of `accounts_log`. 3) if exists compare the latest `timespamp` field of `accounts_log` associated with `ip`='123' to current time to see if it is greater than 12 hours. 4) return available entries.
insert...update in mysql?   (353 Views)
I am trying to insertupdate into multiple tables how do i do that I have 3 tables e.g. table x table y table z. table x (x_id) table y( y_id, x_id) //x_id-foreign key referencing table x table z (z_id, y_id) //y_id-foreign key referencing table y
Where can I get libmysql.dll v5.1.23-rc for PHP?   (281 Views)
Hi Guys, Would dearly appreciate some help please, I'm totally lost! I'm running on Windows XP Pro sp2 MySQL Server version = 5.1.23-rc MySQL Client = 5.0.22 Apache = 2.2 PHP = 5.2 phpMyAdmin = 2.11.5 Message in phpMyAdmin warns of the mismatch in between the Server and the client version of MySQL and in addition I seem to have some weird problems which I think are probably related. I tried copying the libmysql.dll file from the MySQL installation directory into the PHP directory and sure enough the error disappeared in phpMyAdmin but then the Apache 2.2 server kept quitting unexpectedly! Even after a reboot, Apache was still a bit flakey and when I tried to load a PHP website residing locally, Firefox offered to download the PHP file and open it in an editor! After I restored the old libmysql.dll file that I had renamed, I checked the same local website again and all was well, but I'm back with the weird errors on my sites which use MySQL and the warning in phpMyAdmin. I've looked online for a file that might work with my MySQL version but can only find information about 'compiling' one! What's all that about Where can I get one pre-built (since not being a software programmer I have zero knowledge about compiling)
How do I set the DELIMITER in mysql?   (209 Views)
How do I set the DELIMITER in mysql Im using an older version of phpmyadmin, apparently the newer versions have a way to type it in when you run a query. I have no way to upgrade the version and that option isn't available to me. Is there another way to change the DELIMITER
my mysql Server get down   (244 Views)
Hi , Is there any way to check the all query execution time and where can I find the MySQL confegration file I have a problem that MySQL server became down, "I must restart the server" .. I don't know what do to , I guess it could happend from Heavy query or there is erro in the confegratio file.. any body can give me advice
retrieval of data in chunks using mysql query   (300 Views)
One of the fields in mysql table contains a very large data (around 3-4 MB). Is it possible to retrieve the data in chunks using mysql query If possible how to write the query then
mysql insert+php4 vs php 5???   (323 Views)
Dear, I have wrote an insert query and it works fine when under php4.. However, when i move to php5, the data is not store in the database.. No error is sent althought I use mysql_error() at the connection, query to database.. May i know why is this happened How can I solve it My script is as below: PHP Code: mysql_connect("localhost","user","123741")ordie(mysql_error()); mysql_select_db("database1")ordie(mysql_error()); mysql_query("INSERTINTOrecord(ic,name,email)VALUES('".$ic."','".$usrname."','".$email."')")ordie(mysql_error()); Print"Yourinformationhasbeensuccessfullyaddedtothedatabase.";
int(M) in mysql - What does M mean?   (379 Views)
Just wonder, what means have number M at the field declaration like field_name INT(M) I have used to use it as length in bytes, mannual claim, that M indicates the maximum display width for integer types , but simple tests doesn't show any difference between int(1), int(3), int(5), int(11). So basically, what does that number mean
Error trying to import to please   (484 Views)
I exported a small database to my computer Desktop. A .sql file. I asked my new web host to help me import it my new web mysql. I uploaded it and they attempted it directly to mysql(no phpmyadmin) and they replied "the importing of the backuped file to your database gives errors, and overwrites existing settings" and then provided the foloowing information below. Can someone help me tell me what this means and explain what went wrong and how this can be remedied Thank you. Query: CREATE TABLE `accounts` ( `account_id` bigint(20) NOT NULL auto_increment, `user_name` varchar(50) NOT NULL, `first_name` varchar(100) NOT NULL default '', `middle_initials` varchar(10) NOT NULL default '', `last_name` varchar(100) NOT NULL default '', `password` varchar(100) NOT NULL, `security_question` varchar(250) NOT NULL default '', `security_question_answer` varchar(250) NOT NULL default '', `email` varchar(200) NOT NULL, `phone` varchar(100) NOT NULL default '', `mobile_phone_number` varchar(100) NOT NULL default '', `account_type_id` int(11) NOT NULL default '1', `address` varchar(255) NOT NULL default '', `address_second` varchar(255) NOT NULL default '', `state` varchar(150) NOT NULL default '', `city` varchar(150) NOT NULL default '', `zip_code` varchar(150) NOT NULL default '', `country_id` int(11) NOT NULL default '0', `country_name` varchar(100) NOT NULL default '', `status_id` int(11) NOT NULL default '1', `status_title` varchar(50) NOT NULL, `date_creation` date NOT NULL, `date_last_login` date NOT NULL, `user_agreement` varchar(20) NOT NULL, `last_ip_address` varchar(20) NOT NULL, `activation_code` varchar(100) NOT NULL default '', `date_last_payment` date default NULL, `terms` varchar(3) default 'yes', `login_count` int(11) NOT NULL default '0', PRIMARY KEY (`account_id`), UNIQUE KEY `ix_accounts_email` (`email`), UNIQUE KEY `ix_accounts_user_name` (`user_name`), KEY `ix_accounts_first_name` (`first_name`), KEY `ix_accounts_family_name` (`last_name`), KEY `ix_accounts_country_id` (`country_id`), KEY `ix_accounts_status_id` (`status_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 Error occured at:2007-10-01 19:26:42 Line no.:59 Error Code: 1050 - Table 'accounts' already exists
Help please running mysql on os x   (258 Views)
Hi - I am very new to mysql. I am using the sitepoint book 'Build your own Database Driven Website using PHP and MYSQL. I have installed mysql mysql-5.0.41-osx10.3-powerpc. Under preferences/mysql it indicates that the mysql server is running. When I try to access mysql through the terminal window I get a message - command not found. Or no permissions. I can go to the bin directory and list the contents - they seem to be there. I can't get past page 21/22 Post-installation setup tasks. I am also new to using the terminal window. I suspect I have missed something really basic - any suggestions on how I can get up and running would be much appreciated!
UTF8 in script and in mysql   (427 Views)
, I use the meta tag to indicate that a text should be saved in utf8 format in a mysql database. Which works fine, but I also noticed that in mysql itself you can indicate through the collation which encoding should be used. So what happens if the meta tag says use utf but the mysql table is set to latin1_swedish_ci Switching the mysql table to utf8_unicode_ci doesn't seem to make a difference.
Why is this causing an error in mysql5   (313 Views)
So this query: Code: $updatestats="update cl_entries set out=out+'1' where entryID='$entryID'"; Work fine in mySQL 4 but it bombs out in mySQL 5, giving a syntax error near out=out+'1'. I've also tried out=out+1 but it gives the same error What the heck changed in 5
Need help with mysql.exe   (259 Views)
Extreme newbie here. I'm going through Kevin Yank book about PHP and MySQL. I haven't gotten very far. I installed PHP and MySQL on my computer for practice purposes. I followed the instructions thus far to the letter. In chapter 2 it advises to open the file mysql.exe. When I do, it takes me to a command prompt for about 1 second, then beeps and shuts down the prompt. What the heck What am I doing wrong
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)   (330 Views)
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46) I get this error when I try to communicate with a table I made using a text file (last posted item). Leoj :: pass => for the table realestate... User-----Host---------Type------------Privileges----------Grant leoj------localhost-----wildcard: %-----ALL PRIVILEGES-------Yes yroot----localhost-----global-----------ALL PRIVILEGES-------Yes conn.php: PHP Code: realestate.sql: PHP Code: --phpMyAdminSQLDump--version2.6.1-rc1--,2005at01:35AM--Serverversion:4.0.22--PHPVersion:4.3.10----Database:`vangon77_dcb`----------------------------------------------------------------Tablestructurefortable`re_admin`--CREATETABLE`re_admin`( `AdminID`varchar(50)NOTNULLdefault'', `AdminPass`varchar(32)NOTNULLdefault'', `AdminName`varchar(100)NOTNULLdefault'', `AdminEmail`varchar(150)NOTNULLdefault'', PRIMARYKEY (`AdminID`))TYPE=MyISAM;----Dumpingdatafortable`re_admin`--INSERTINTO`re_admin`VALUES('test','test','YourName','');--------------------------------------------------------------Tablestructurefortable`re_agents`--CREATETABLE`re_agents`( `AgentID`int(10)NOTNULLauto_increment, `username`varchar(50)NOTNULLdefault'', `password`varchar(32)NOTNULLdefault'', `FirstName`varchar(150)NOTNULLdefault'', `LastName`varchar(150)NOTNULLdefault'', `resume`textNOTNULL, `phone`varchar(50)NOTNULLdefault'', `cellular`varchar(50)NOTNULLdefault'', `pager`varchar(50)NOTNULLdefault'', `ResumeImages`textNOTNULL, `email`varchar(150)NOTNULLdefault'', `logo`varchar(255)NOTNULLdefault'', `RegDate`int(10)NOTNULLdefault'0', `ExpDate`int(10)NOTNULLdefault'0', `AccountStatus`varchar(20)NOTNULLdefault'pending', `PriorityLevel`int(1)NOTNULLdefault'0', `offers`int(3)NOTNULLdefault'0', `news`char(1)NOTNULLdefault'y', `NewsletterType`varchar(10)NOTNULLdefault'plain', `days10`char(1)NOTNULLdefault'n', `days5`char(1)NOTNULLdefault'n', `days1`char(1)NOTNULLdefault'n', PRIMARYKEY (`AgentID`), UNIQUEKEY`username`(`username`), UNIQUEKEY`email`(`email`))TYPE=MyISAMAUTO_INCREMENT=1;----Dumpingdatafortable`re_agents`----------------------------------------------------------------Tablestructurefortable`re_banners`--CREATETABLE`re_banners`( `ClientID`int(10)NOTNULLdefault'0', `BannerID`int(10)NOTNULLauto_increment, `BannerURL`varchar(255)NOTNULLdefault'', `BannerFile`varchar(255)NOTNULLdefault'', `BannerAlt`varchar(255)NOTNULLdefault'', `BannerType`varchar(50)NOTNULLdefault'', `bCat`int(10)NOTNULLdefault'0', `bSub`int(10)NOTNULLdefault'0', PRIMARYKEY (`BannerID`))TYPE=MyISAMAUTO_INCREMENT=1;----Dumpingdatafortable`re_banners`----------------------------------------------------------------Tablestructurefortable`re_categories`--CREATETABLE`re_categories`( `CategoryID`int(10)NOTNULLauto_increment, `CategoryName`varchar(255)NOTNULLdefault'', PRIMARYKEY (`CategoryID`), UNIQUEKEY`CategoryName`(`CategoryName`))TYPE=MyISAMAUTO_INCREMENT=5;----Dumpingdatafortable`re_categories`--INSERTINTO`re_categories`VALUES(3,'ForSale');INSERTINTO`re_categories`VALUES(4,'ForRent');--------------------------------------------------------------Tablestructurefortable`re_listings`--CREATETABLE`re_listings`( `ListingID`int(10)NOTNULLauto_increment, `AgentID`int(10)NOTNULLdefault'0', `CategoryID`int(10)NOTNULLdefault'0', `SubcategoryID`int(10)NOTNULLdefault'0', `address`textNOTNULL, `city`varchar(100)NOTNULLdefault'', `state`varchar(100)NOTNULLdefault'', `country`varchar(150)NOTNULLdefault'', `ShortDesc`textNOTNULL, `DetailedDesc`textNOTNULL, `Price`float(15,2)NOTNULLdefault'0.00', `PropertyType`varchar(50)NOTNULLdefault'', `neighbourhood`textNOTNULL, `rooms`int(2)NOTNULLdefault'0', `bathrooms`int(2)NOTNULLdefault'0', `fireplace`char(1)NOTNULLdefault'n', `garage`int(2)NOTNULLdefault'0', `SquareMeters`float(15,2)NOTNULLdefault'0.00', `LotSize`float(15,2)NOTNULLdefault'0.00', `HomeAge`int(3)NOTNULLdefault'0', `NearSchool`char(1)NOTNULLdefault'n', `NearTransit`char(1)NOTNULLdefault'n', `NearPark`char(1)NOTNULLdefault'n', `OceanView`char(1)NOTNULLdefault'n', `LakeView`char(1)NOTNULLdefault'n', `MountainView`char(1)NOTNULLdefault'n', `OceanWaterfront`char(1)NOTNULLdefault'n', `LakeWaterfront`char(1)NOTNULLdefault'n', `RiverWaterfront`char(1)NOTNULLdefault'n', `image`textNOTNULL, `DateAdded`int(10)NOTNULLdefault'0', `visits`int(10)NOTNULLdefault'0', PRIMARYKEY (`ListingID`))TYPE=MyISAMAUTO_INCREMENT=1;----Dumpingdatafortable`re_listings`----------------------------------------------------------------Tablestructurefortable`re_mail_archive`--CREATETABLE`re_mail_archive`( `subject`varchar(255)NOTNULLdefault'', `message`text, `MailDate`int(10)NOTNULLdefault'0')TYPE=MyISAM;----Dumpingdatafortable`re_mail_archive`----------------------------------------------------------------Tablestructurefortable`re_prices`--CREATETABLE`re_prices`( `PackageName`varchar(50)NOTNULLdefault'', `PriceID`int(10)NOTNULLauto_increment, `PriceValue`float(5,2)NOTNULLdefault'0.00', `Duration`varchar(10)NOTNULLdefault'', `PriorityLevel`int(1)NOTNULLdefault'0', `offers`int(10)NOTNULLdefault'0', PRIMARYKEY (`PriceID`))TYPE=MyISAMAUTO_INCREMENT=7;----Dumpingdatafortable`re_prices`--INSERTINTO`re_prices`VALUES('GrowUp',5,25.00,'1',3,15);INSERTINTO`re_prices`VALUES('StartMeUp!',4,14.95,'1',1,3);INSERTINTO`re_prices`VALUES('ShakeUp',6,34.95,'2',4,10);--------------------------------------------------------------Tablestructurefortable`re_priority`--CREATETABLE`re_priority`( `PriorityID`int(10)NOTNULLauto_increment, `PriorityName`varchar(50)NOTNULLdefault'', `PriorityLevel`int(1)NOTNULLdefault'0', PRIMARYKEY (`PriorityID`), UNIQUEKEY`PriorityName`(`PriorityName`))TYPE=MyISAMAUTO_INCREMENT=8;----Dumpingdatafortable`re_priority`--INSERTINTO`re_priority`VALUES(1,'Premium',5);INSERTINTO`re_priority`VALUES(2,'Gold',4);INSERTINTO`re_priority`VALUES(3,'Platinium',3);INSERTINTO`re_priority`VALUES(4,'Bronze',2);INSERTINTO`re_priority`VALUES(7,'Standart',1);--------------------------------------------------------------Tablestructurefortable`re_settings`--CREATETABLE`re_settings`( `id`int(1)NOTNULLdefault'0', `SiteTitle`varchar(255)NOTNULLdefault'', `SiteKeywords`varchar(255)NOTNULLdefault'', `SiteDescription`text, `ContactEmail`varchar(150)NOTNULLdefault'', `CompanyAddress`text, `PayPalEmail`varchar(150)NOTNULLdefault'', `SellerID`int(5)NOTNULLdefault'0', `Agreement`textNOTNULL)TYPE=MyISAM;----Dumpingdatafortable`re_settings`--INSERTINTO`re_settings`VALUES(1,'RealEstates','realestate,sales,rent,forrent,forsale,house,houses,apartment,apartments,studio,studios,rooms','FindpropertyforsaleandrentaccrosstheUSA','','Kingston,23Str.\r\n23332State','',84734,'yourtext\r\n\r\nsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfg\r\n\r\nsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfgsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfg\r\n\r\n\r\nsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfgsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfgsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfgsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfg\r\n\r\nsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfg\r\n\r\nsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfgsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfgsdfsdfgsdfgsdfgsdfgsdfsdfgsdfgsdfgdfg');--------------------------------------------------------------Tablestructurefortable`re_stats`--CREATETABLE`re_stats`( `BannerID`int(10)NOTNULLdefault'0', `impressions`int(10)NOTNULLdefault'0', `clicks`int(10)NOTNULLdefault'0', `mydate`int(10)NOTNULLdefault'0', `ip`varchar(50)NOTNULLdefault'')TYPE=MyISAM;----Dumpingdatafortable`re_stats`----------------------------------------------------------------Tablestructurefortable`re_subcategories`--CREATETABLE`re_subcategories`( `SubcategoryID`int(10)NOTNULLauto_increment, `SubcategoryName`varchar(255)NOTNULLdefault'', `CategoryID`int(10)NOTNULLdefault'0', PRIMARYKEY (`SubcategoryID`))TYPE=MyISAMAUTO_INCREMENT=10;----Dumpingdatafortable`re_subcategories`--INSERTINTO`re_subcategories`VALUES(3,'Houses',4);INSERTINTO`re_subcategories`VALUES(4,'Appartments',4);INSERTINTO`re_subcategories
copy tables from oracle to mysql   (345 Views)
I want to copy some table from oracle to mysql, oracle table is having large amount of data, how to convert from oracle to mysql Plz let me know the solution