Hot answers tagged

15

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, ...


8

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:


6

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 my SQL database manager: show variables like 'socket' The only result was the following: /Applications/MAMP/tmp/mysql/mysql.sock So I changed the variable in LocalSettings.php as follows: $wgDBserver = &...


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 ...


5

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

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

This is quite doable. XAMPP should work fine for this. The biggest gotchas will be converting any code that does not use relative addressing to work with a domain and HTTPS. You can likely get closer to your goal by using the hosts file on your computer to create a domain name (but only have it work on computers with a modified hosts file) WordPress is a ...


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

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

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

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

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

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

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

What you should do is to modify $cfg['Servers'][$i]['hide_db'] because it accepts regular expressions so be default there is: $cfg['Servers'][$i]['hide_db']='(mysql|information_schema|performance_schema|test|phpmyadmin)'; You should change it into: $cfg['Servers'][$i]['hide_db']='^(mysql|information_schema|performance_schema|test|phpmyadmin)$'; Now only ...


2

This may not help you but it might help someone else. Had installed EasyPHP wamp stack and could create a database in phpMyAdmin but it would not show up in the list of databases. I manually logged into mysql via the command line console and could see my database. Was banging my head against the wall on this one. Turns out I named my database test1 and ...


2

You can use an image as a counter, in this case it won't count bots and page name is passed as a query with image name I'm using this at img.php which update page view in database: <?php $xnt = $_GET["ID"]; if (isset($xnt) && is_numeric($xnt)) { $DBServer = "localhost"; $DBUser = "xxx"; $DBPass = "xxx"; $DBaze = "xxx"; $conn = mysqli_connect($...


2

The actual answer is no you can't! Sure there many things to simulate it. But think of the user uses the other persons computer/account or even browser! You can modify local IP addresses, cookies, http-headers, java-applets or all other clientside things. Most sites who want this has limits of accounts per IP-address. You also may try to filter the ...


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 ...


2

This sounds like you would benefit from a GUI to do this for you... However some one would need to build that for you (assuming you're not a developer). Exporting to a different format is not advisable in most cases as if your database is relational or has any constrains, then editing without having these rules enforced will likely cause issues and prevent ...


2

TYPE should be ENGINE CREATE TABLE `sbbleads_admin` ( `sb_id` BIGINT( 20 ) NOT NULL AUTO_INCREMENT , `sb_admin_name` VARCHAR( 255 ) DEFAULT NULL , `sb_pwd` VARCHAR( 255 ) DEFAULT NULL , PRIMARY KEY ( `sb_id` ) ) ENGINE = MYISAM ;


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