sql

How do I secure my web site?

  1. Brute force dedection should be enabled.
  2. Cache directories should be secured.
  3. Captcha's should be enabled and required for anonym users to avoid spam.
  4. Code Injection should be prevented.
  5. Cookies should NOT be used to store passwords and sensitive data.
  6. CSRF should be prevented.
  7. Directory listing should be disabled.

Replace string in big database or large text file

You have a cms and a big database with over 100 tables and 100.000 entries. And you need to replace all entries contain "example.com" with "www.example.com". How you do that? Editing all entries manually with phpmyadmin? It could takes weeks to complete. I have found a solution and want to share with you.

Steps:

1. Export your whole database in a text file : db.sql
2. Replace string using Linux sed command
3. Empty your db and import new sql file

Export your mysql database into a text file: db.sql

mysqldump -u root -p your_database_name > db.sql

Import big SQL Files under WAMP or LAMP ?

I want to import a sql file, which is larger than 100 MB. I cant upload it with Phpmyadmin, because PHP's upload limit is 8 MB. I tried with Mysql Console ie: "mydatabasename < c:\path\to\file.sql" but got en standart mysql query-error. How to do it easily?

What is the difference between Mysql inner and outer join?

What is the most important difference between inner, outer, left and right joins? Please explain easy. Thanks!

Syndicate content

CafeWebmaster.com(CW) is a free online community for webdevelopers and beginners. Anybody can share their code, articles, tips, tutorials, code-examples or other webdesign related material on the site. Newbies can submit their questions and reply to existing questions. CW does not guarantee or warrant reliability of code, data and information published on the site. Use the site on your own risk. The site takes no responsibility of direct or indirect loss or any kind of harm to its users. The site also doesn't take responsibility of infected files or source code with any kind of infection or viruses, worms, spywares, malwares, trojan horses. CW reserves the right to edit, move, or delete any of content for any reason.