Hot answers tagged

14

Here are more organized queries against the INFORMATION_SCHEMA Sizes By Storage Engine SELECT IFNULL(B.engine, 'Total') "Storage Engine", CONCAT(LPAD(REPLACE(FORMAT(B.DSize / POWER(1024, pw), 3), ',', ''), 17, ' '), ' ', SUBSTR(' KMGTP', pw + 1, 1), 'B') "Data Size", CONCAT(LPAD(REPLACE( FORMAT(B.ISize / POWER(1024, pw), 3), ',', ''), 17, ' '), ...


12

Sitemaps can be dynamic just like web pages. Just have a PHP script grab those names from the database and make a loop to echo out the XML for each one. Also, make sure you output the proper content type for your XML. That's it. The code below is a basic script for generating a dynamic XML sitemap. Please not this is only an example intended to point you, ...


9

I finally found the easy way to get this information directly from Amazon with a couple of clicks. Log into the RDS management dashboard Click on "DB Instances" Click on the instance in which you are interested. That should expand it and show much more info about it. View the "Monitoring" tab. There is a "Free Storage Space" graph:


7

Without knowing more about your app or seeing some real code it is hard to give any detailed security advice. That being said here are some things that come to mind after reading your post: 1: Keep your config file with the database connect info and salt key outside the public directory and chmod it to 444 or 644. You can access one directory above your ...


6

Google has no knowledge of the actual file structure of your web app and what is accessible to the public. A news site, for example, will have hundreds of articles to view, but might only have one actual script: article.php. Server-side directives might allow pretty canonical URLs like /category/283423-pretty-name to point to /article.php, and this is what ...


5

SUGGESTION #1 If you do any backups of MySQL Instance it is best to setup MySQL Replicaton so that any impose server load or increase disk I/O does not impact your production database is any way. Once you setup MySQL Replication, you can script a mysqldump in different ways (Please see my post on the DBA StackExchange for the variety of techniques), as long ...


5

LOOPING There are two methods to loop in PHP: for, and; foreach The PHP for Loop The for loop is used when you know in advance how many times the script should run. Syntax for (init counter; test counter; increment counter) { code to be executed; } Parameters: init counter: Initialize the loop counter value test counter: Evaluated for each loop ...


5

You've just identified why phpMyAdmin should be only accessible through a protected backend like cPanel... or other means. If Google indexes it, you will be providing a Google Dork, the term for inept server admin mistakes. Lock down access to it via your .htaccess file with either a login or by limiting the ip addresses that can see the link with a 403 ...


4

After much research, I may have found the solution. If I'm correct, it was an apache config problem. Specifically, the "ThreadsPerChild" directive. See... http://httpd.apache.org/docs/2.2/platform/windows.html Because Apache for Windows is multithreaded, it does not use a separate process for each request, as Apache can on Unix. Instead there are ...


4

There are a number of reasons why Google Analytics may not be showing the traffic your database shows... Your Code Is Positioned Poorly Your GA tracking code should be in the head section of the document, some webmasters put it in the bottom to improve load times however this can sometimes mean that the user has come to your site and then bounced right ...


4

In WAMPServer 3, it is in the same place it has always been. You left click the wampmanager icon in the system tray and you will see this menu appear Just like before its called MySQL console


4

I seem to have resolved this by explicitly adding the socket to the $wgDBserver variable in LocalSettings.php. To get the socket path, I ran this query in Sequel Pro: show variables like 'socket' The only result was the following: /Applications/MAMP/tmp/mysql/mysql.sock So I changed the variable as follows: $wgDBserver = "localhost:/Applications/MAMP/...


3

You have to configure PHPMyAdmin to connect to the MySQL database first. If you go to http://wiki.phpmyadmin.net/pma/Config you'll see that you need to add the following example to your config.inc.php file: $cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname $cfg['Servers'][$i]['port'] = ''; // MySQL port (leave blank for 3306) $cfg['Servers'][$...


3

Think I have found the problem: You created the access for something@'%' but not for something@'localhost' % is not localhost for MySQL, you have to make another addition. This is why the error message is complaining about something@'localhost' http://dev.mysql.com/doc/refman/5.5/en//adding-users.html


3

Yes you can, I just wrote a blog post on doing just this http://markshust.com/2012/10/29/deploying-magento-heroku-amazon-rds


3

My approach involves two passes: Filter only web browsers and consoles by matching the start of the user agent string with Mozilla|Opera|PSP|Bunjalloo|wii. Thanks to the user agent spoofing this check will detect almost all browsers Exclude bots by common stop strings bot|crawl|slurp|spider So if the first step is passed we assume that it is a browser and ...


3

I found the issue was the user for that cPanel account actually had an identical password to my WHM account and this threw an error (though user names were different). I changed it and it was ok.


3

MySql Use mysqldump to get the data out of your live database Transfer the dump file to your VM Use mysql command to import the data Here is a website that can walk you through the process: http://www.mydigitallife.info/how-to-backup-and-restore-export-and-import-mysql-databases-tutorial/ If your PHP code has the db user and password hard coded, then you ...


3

Although it looks like Stephen answered your question I figured I would respond to the title of the question, "Setting up a LAMP VM server for Development and Testing?" Get Virtual Box, it's free and easy to use. Get the ISO for Ubuntu, Debian or the operating system that best mimics your production environment. You might have to spend money. Microsoft ...


3

No, it's not. Node.js and MySQL are completely different things. From http://nodejs.org: Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that ...


3

OK I managed to get it work. I chopped the sql export and exported separately: the structure (1 file) and the data up to 5 tables at a time. Importing the data on a new server in such pieces returned no error.


3

You can export the database information as many text formats like CSV, JSON, TXT, SQL, etc. But usually databases are more complex than just the information contained there, for instance, there may be dependencies between tables, autoincrement fields, foerign key restrictions, etc. If you just edit the exported text, you may be breaking some of the ...


3

If MySQL servers we open to the general public like your website it would open them up to brute force attacks, and other remote attacks by bots mostly which they simply don't need to deal with. Most people who know enough that they'll need remote MySQL access should be familiar with setting that up in cPanel etc. It's a matter of security for you, and less ...


3

Doesn't matter what directory you run the command in, however it will save the sql dump file into the folder your currently in if using SSH to run the command. If you would like to save the file in an alternative path or should you be running it using a cron job then simply edit the last string with the full path you'd like to save the file too, i.e DBNAME &...


3

A sitemap does not usually help get pages indexed. See The Sitemap Paradox. To get pages indexed: You need to link to each page from some other page or preferably multiple other pages. Include enough unique content on each profile that Google doesn't view the pages as duplicate. Provide a good landing page experience for anybody coming to the page from ...


3

TWiki stores content directly in the file system. Look for twiki/data and twiki/pub directories. The twiki/data has directories representing TWiki webs (workspaces). Those webs contain files representing the wiki page data. There is a .txt file with page content, and a .txt,v file with page history. For example, page SlicedBread in the Eng web will be at ...


3

No, it's not good practice to create a database user for every site user. The way you have things setup now is pretty standard. It shouldn't be possible for people to get access to passwords stored in your PHP code unless your server is compromised, and that's pretty much the worst case scenario. The only caveat is that if you are using some form of source ...


3

I have been working for a hosting company and I must say, yes it is pretty normal for small and middle sized hosters and usually has good reasons. If you choose a cheap webspace plan, your site is running on a server that is shared among many customers. If the hosting provider would update PHP, it would normally affect all customers on that server. And PHP-...


3

Create the remote connection To create a remote connection: On your database server, as a user with root privileges, open your MySQL configuration file. To locate it, enter the following command: mysql --help The location displays similar to the following: Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my....


2

When you login to phpMyAdmin as the root user you are able to view ALL the databases and perform operations on any of them. If you want to limit access to only a specific user: Create a user for the specific database e.g user1 with their password1 Then on the phpMyAdmin Login page if the user enters their user1 and password1 they will only have access to ...


Only top voted, non community-wiki answers of a minimum length are eligible