SEARCH YOUR SOLUTION HERE  

MySQL: Fulltext v/s LIKE %keyword%

Hi

I was trying to learn what a Fulltext search is and was wondering:

1) How is it different from the LIKE '%keyword%' operator
2) Why should I use a Fulltext search and not the LIKE operator or when to use what

Can someone please explain this to me


Many

Posted On: Thursday 25th of October 2012 10:07:32 PM Total Views:  422
View Complete with Replies




Related Messages:

Just installed mysql - cannot log in to change password   (173 Views)
I am borderline about to throw my computer out the window....I have installed, removed, installed again, removed again mysql 5.0 on my brand new Fedora 5 core with little success. I am logged in as root, and can get mysqld to start, however when I attempt to change my password by the following: mysql -u root I get the following message: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) How can I be denied if I just installed the damm thing!! I do not get this at all. Any help would be greatly appreciated. I am logged in as root, I'm have just installed mysql - what do I do , Also check this thread if you haven't already. Another user has just gone through what sounds like a similar set of issues, you might find some clues there. , files ending .gz are usually a type of zip file. Sounds like it may have been downloaded but not unzipped. Can you describe exactly what you did to install mysql , Quote: Originally Posted by askjoe yum install mysql This is the exact command I used Are you certain you didn't install the mysql client alone Unless I'm mistaken, fedora packages mysql client and server in seperate packages. Try 'yum install mysql-server'. , Hmm. It's been awhile since I ran either Redhat or Fedora. What is the output of this command: Code: chkconfig --list | grep 'mysql' , Ok, so it indicates that it is installed and set to run at init level 5 (basic multiuser / X runlevel), so that's fine as long as you're logged in to X. I might change it to run in both '3' and '5', but it should be ok for now. Ok, how about trying these commands (as root or superuser) Code: /etc/init.d/mysqld restart and Code: netstat -autv | grep 'mysql' and finally Code: grep 'localhost' /etc/hosts That last command there, I'm curious if you're simply missing a 'localhost' entry in your /etc/hosts file. , Hmm, well as they say, "that's a good one". Everything seems to indicate that the server is installed, running and ready to accept connections, from any IP, on the default port. Have you run down the list of 'causes of access denied errors' I'm not certain where the log might be, have you checked /var/log Which version of mysql-server is installed Do you have the latest updates Have you had any success logging in as the MySQL 'root' user Have you tried simply logging in as a guest user, e.g. simply calling the `mysql` command without specifying a user with the -u switch Tried logging in as 'root' or the guest user with your 'other' hostname, e.g. the machine name Code: mysql -u root -h xyz Where 'xyz' is your hostname.
Fedora Core MySql - mysql.sock Error 2002   (205 Views)
I have installed server,client and devel of mysql-4.1.11-2 on Linux Fedora. I am not able to start the mysql. The erroe I am getting is ERROR 2002 (HY000) : Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' Now this mysql.sock is present in /var/lib/mysql/ directory it is present in /tmp Even I tried /etc/rc.d/initd/mysqld -restart then sql stop and sql start both FAILED Can any body tell me what is the problem here
What Linux to install for mysql   (169 Views)
I am creating a dedicated DB server running mysql. What is the best linux to install for this Also the db server will have its own ip is there any other additional security measures that should be taken thanks , VectorLinux may be a good choice. It's a faster version of slackware, but it's based on slackware, so you should get good stability. Haven't played with it very much yet. SoL (Server Optimized Linux) is another one to look at. It's designed to be just a server. OpenBSD is the most secure solution, however I don't know what the performance of MySQL is on a BSD platform compared to a Linux platform.
LIFO - last in first out & using filesort problems in mysql   (171 Views)
LIFO - last in first out & using filesort problems in mysql * How to improve table structure & query better, 'Using filesort' not happend mysql 4.0.21 table ad( siteid int primary key sitetitle varchar(30) sitedescription text sitedate datetime ) index sitedate data: select * from ad result: siteid , sitetitle , sitedescription , sitedate 1 , keyboard, 3 items , 2006-05-16 17:07:46 2 , motherboard , nothing , 2006-05-17 17:07:02 3 , mouse , stock , 2006-05-17 17:07:49 4 , computer , expired , 2006-05-18 07:01:46 . . . if table record are 2000000 then explain select * from ad order by sitedate then 'Using filesort' happend so the query very slow (20 seconds with 30 connection) * How to improve table structure & query better, 'Using filesort' not happend * How to improve table structure & query better, then query display as LIFO - last in first out without, using order by * How to improve table structure & query for LIFO whenever update to sitedate field exp : select * from ad where siteid in (3,4) the result: siteid , sitetitle , sitedescription, sitedate 4 , computer , expired , 2006-05-18 07:01:46 3 , mouse , stock , 2006-05-17 17:07:49 * if I do: update ad set sitedate = '2006-05-19 07:01:46' where siteid=3 result exp : select * from ad where siteid in (4,3) the result: siteid , sitetitle , sitedescription , sitedate 3 , mouse , stock , 2006-05-19 17:07:49 4 , computer , expired , 2006-05-18 07:01:46 Thank you all people
How can I still keep mysql querying once it hits an error?   (291 Views)
I have a query: Quote: mysql_query("insert into $dbname.brands (brands) select distinct brands from $dbname.prodse_$mid where app=1 limit $views, $records"); On the insert table there is a unique index so that I only get one of each value. I have also used distinct on the select part of the query so that it doesn't throw up any errors when it can't insert a value due to it being a duplicate. Everything works fine apart from I need to keep these values that I have already inserted and only some of them get deleted that aren't used anymore. I have to update this table every day that has the inserts in, but when I try this it does not work, because it just throws up and error as it is trying to insert duplicates where it can't because I am using unique index. How can I stop the query from stopping once it hits a duplicate and then fails. How can I keep it going on to the next row of the select part of the query.
Securing new mysql installation   (199 Views)
I just installed mysql 4.x on Kubuntu 5.10 via apt-get. I want to secure the account as per the instructions found at: http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html I apparantly have these users: mysql> select Host, User FROM mysql.user; +-----------+------------------+ | Host | User | +-----------+------------------+ | ety | root | | localhost | debian-sys-maint | | localhost | root | +-----------+------------------+ 3 rows in set (0.11 sec) So I proceed tto the first step in the guide, but I get this error: mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('my_password_here'); ERROR 1133: Can't find any matching row in the user table What is the proper way to continue Should I use these three commands: mysql> SET PASSWORD FOR 'root'@'ety' = PASSWORD('my_password_here'); mysql> SET PASSWORD FOR 'debian-sys-maint'@'localhost' = PASSWORD('my_password_here'); mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('my_password_here'); Thank you in advance.
Mysqldump & mysqlimport question   (296 Views)
hi I have done: mysqldump -u root -p --all-databases > file.sql which dumped arounf 80megs now, I am struggling to import it back on another server what shoudl i use mysqimport what syntax cheers
Problems logging into mysql via shell script   (142 Views)
Greetings, I am trying to come up with an import script to automate nightly updates of a remote mysql database. I can't figure out how to make the login command to the password as an argument and not prompt me for it. It gives me a password error even though the password is correct (believe me, ive checked a hundred times). I just don't think im sending it correctly Here is the whole script: mysql -h database -u username --password=password use databasename truncate table tablename LOAD DATA LOCAL INFILE '/path/to/csv/file.csv' INTO TABLE `tablename` FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'; If I try to log in manually I have no problems mysql -h database -u username -p It then prompts me to enter my password, I enter it, and get in without a problem. If there is not a way to send the password in the script, is there a way to have it entered automatically in the prompt
mysql datetime columns vs integer columns using unixtimestamps   (165 Views)
Up until now, I've been storing my times in an integer field as unix timestamps. I'm thinking about making the switch to mysql's date/time column types instead but I have a question. I do a lot of comparing with dates and was wondering if using mysql's date/time column types will slow down my queries since it has to convert the column to an "internal long integer" to do a comparison rather than not just comparing straight integers with a unix timestamp in an integer column. source: http://dev.mysql.com/doc/refman/5.0/en/using-date.html Quote: Originally Posted by mysql.com When you compare a DATE, TIME, DATETIME, or TIMESTAMP to a constant string with the , or BETWEEN operators, MySQL normally converts the string to an internal long integer for faster comparision (and also for a bit more relaxed string checking). I'm hoping that I'm just being paranoid and the actual performance difference is neglible. Please discuss.
Are too many mysql privileges/users a bad thing?   (152 Views)
I was wondering what the suggested practice is when it comes to mysql privileges/users I have a bunch of individual apps that I currently have a dedicated username per app. I was reading that too many usernames/privileges may actually be a bad thing and was wondering what the best practice would be Having individual passwords I would think would be best for security as in case there is an issue with the code, peoeple could not exploit the other databases. Is it common practice to create 1 username/password for all your databases
exporting to mysql from access with primary keys intact?   (173 Views)
Is there any way to export my tables from access and keep the primary keys intact At the moment I use the DSN driver to link the tables and feed them into mysql but I lose the primary keys.
mysql conferences (was "newly joined")   (165 Views)
hello everybody, i have joined this group newlly. will there be any mysql conferences every year if anybody knows about them please inform me..
select next from in mysql   (190 Views)
id date panaid 5 1332533806 14 543 1332533943 16 322 1332533825 29 anyone have simple idea to select by date next row if true then give next id
insert 4 digit only in database mysql   (169 Views)
hi .. i want to insert ID NUMBER in my table, ex. i want to insert "1" and in table stored "0001", if i insert "12", in table stored "0012". The point is i want to insert 4 digits in my table. Can my master help my problem
3 tables delete query. mysql geek need :)   (173 Views)
I have 3 tables! Need a MYSQL delete query to delete rows in 3 tables at same time... table1: log_visit 1) Need to DELETE from log_visit WHERE counter > 5 id | visit | visitor | counter 1 - 10 - qwerty | 15 2 - 11 - qwerty | 10 3 - 12 - azerty | 8 4 - 13 - azerty | 1 it will delete row 1 and 2 table2: log_link_visit_action 2) need to get visit and visitor rows deleted from table1 and delete in table2, in this case [row 1-table1] DELETE from log_link_visit_action WHERE visit = 10 AND visitor= querty [row 2-table1] DELETE from log_link_visit_action WHERE visit = 11 AND visitor=querty [row 3-table1] DELETE from log_link_visit_action WHERE visit = 12 AND visitor=azerty id | visit | visitor | url 15 - 8 - dodid - yahoo.com 16 - 10 - qwerty - google.com 17 - 11 - qwerty - abc.com 18 - 15 - kaz - zzz.com it will delete row 16 and 17 table3: log_action 3) Need to delete all url deleted in table2, in this case [row 17-table2] DELETE from log_action WHERE idaction = 'google.com' [row 18-table2] DELETE from log_action WHERE idaction = 'abc.com' id | idaction 1 - google.com 2 - yahoo.com 3 - abc.com it will delete row 1 and 3 Any possible help joining delete queries in one query would be extremely helpful Many
Doing more in mysql over php - in general a bad idea or good one?   (155 Views)
MySQL offers some ways to perform things that you might put in your application logic. For example, say you want to find the oldest people in a database with an age column. SELECT name, age FROM persons WHERE age = (SELECT MAX(age) FROM persons) This would select only the rows that have the highest integer in the age column (so it would select one or more people). But you could also just do: "SELECT name, age FROM persons" and then use the results of this query to do some php to find the oldest people. In general, which is better for speed and performance I generally try to minimize using my database usage for doing logic, but I don't know if this is a good plan or where to draw the line. It would be helpful to have a good rule of thumb to judge whether I should use the database to do a calculation or organization over php and vice versa.
Problem connecting to mysql through terminal and through mamp   (242 Views)
Can anyone help I don't have much experience of solving this kind of issue. I can no longer connect to mysql through mamp - the light remains red (the apache light is green). In the past typing 'killall -9 mysqld' has done the trick and I have been able to connect to mysql through mamp afterwards. In addition, I am now also unable to connect to mysql through the terminal window. I get the error message ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) The only changes I've made have been to the file config.inc.php in the folder phpMyAdmin, as instructed on page 315 of 'Build your own database driven web site'. (I reverted my changes back but I still get this error message.) Any ideas how I can connect to the database again and get mamp working
Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)   (241 Views)
I know I have the correct information to login to the MySQL database on my site. I am getting an error that states: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) The login information is all in the same config file that is included in every page that needs to access the database. I am ending on the last line below, with this error. PHP Code: echo"{$_SESSION['first_name']}-you'reloggedin.";if(isset($_POST['submitted'])){/*Handletheform*/ $query="SELECTemail,user_idFROMusers_tblWHEREfirst_name='$_SESSION[first_name]'"; echo$query; $result=mysql_query($query); if(!$result){ die('Invalidquery:'.mysql_error());} When I login, I create the session and when get to this page, it displays "Bill you're logged in." showing that I have the correct first_name. What should I do to determine the cause of this error
how to write the sql command in mysql?   (231 Views)
for example: the table named products there is a product name field in the table. i want to show some related items which matched by the knowed products's product name.($product_name) how to write the sql query command eg: if the knowed products's product name is True Blood Season 1 DVD i want to get all the product name which begins as True Blood Season.. if the knowed products's product name is 24 Hours Season 7 DVD i want to get all the product name which begins as 24 Hours Season..
how to use SAAS(plans based tables) in mysql   (196 Views)
all I am just implementing a SASS based database for a sample application. I have 3 plans and all three are different basic medium Advanced I need to develop a db tables in mysql for these 3 memberships I have different options in each plan How can I design the basic db and how can I know who is belongs to which plan using mysql Can anyone help me