To replace particular string with
another in mysql use the following command

update tablename set field =
replace(field,’search_for_this’,'replace_with_this’);

A regular expression is
a powerful way of specifying a pattern for a complex
search.

MySQL allows the following regular expression metacharacters:
. — match any character
? — match zero or one
* — match zero or more
+ — match one or more
{n} — …

A Junior Software engineer, a Senior Software
engineer and their Project Manager are on their way to a meeting. On
their way through a park, they come across a wonder lamp. They rub the
lamp and a ghost appears. The ghost says, “Normally, one is granted
three wishes but as you are three, I will allow one wish each”.

So the eager Junior Software engineer shouted, I want the first wish. I
want to be in the Bahamas, on a fast boat and have no worries.
“Pfufffff” and he was gone.

Now the Senior Software engineer could not keep quiet and shouted …

I was doing a research on
implementing search using mySQL for my site. I learnt the following things. I
would like to share it with you.

One of the more
useful MySQL features is the ability to search for text using a
FULLTEXT index. Currently this is only available if you use the
MyISAM table type (which is the default table type, so if you don’t know
what table type you’re using, it’ll most likely be MyISAM). A fulltext
index can be created for a TEXT, CHAR or VARCHAR type field, or
combination of fields.

Example:

mysql> CREATE TABLE articles (
-> id INT UNSIGNED AUTO_INCREMENT NOT NULL …

To Solve this error, you have to update the
mysql.user table.

GRANT ALL PRIVILEGES ON [dbname].* to ‘[user]‘@’[hostname]‘
identified by ‘[password]‘

Check whether it updated the privileges.

mysql> select Host, User, Password from
user;

Page 42 of 46« First...«4041424344»...Last »

Categories and Tags

Advertising