I have a server that already runs a WordPress site and I wanted to know if there is a way to add another entirely different WordPress site operating on its own Database on the same server. How can this be done on a Windows server?
There are two ways to do this. The first is to just create a separate MySQL database for the new site. You can do this from either PHPMyAdmin or from the MySQL console fairly easily.
CREATE DATABASE `my_new_wordpress_db`;
Then when you do the second wordpress installation use the new database instead of the first database when it asks you for a database name.
Alternatively you can put both installations in the same database but use different table prefixes instead. During the install wordpress provides a "table prefix" option which you can change to something else to allow both sites to be stored in the same database at the same time. You can also find this option on on line 62 of the wp-config.php file.
$table_prefix = 'wp_';
Related
I have a website already built in PHP with MySQL as database.
Now, I want to move on to Wordpress but keep my existing db.
How can I install WordPress and make it work with my existing custom database that I developed during my previous custom website.
You need to install WordPress using the existing database credentials. Setup will create all the tables required to run WordPress on your existing database and rest of your database tables will remain as it is.
Now you can use your existing tables as per your need in WordPress
First install fresh WordPress with DB connections. Then port existing data from old tables to new tables like below queries:
insert into NEWTABLENAME select * from OLDTABLENAME.
It pretty simple.
During Wordpress database information setup
Just write your new site or database name in the table prefix_..(name of new site)
hit summit wordpress will start a new installation
Check image:
First ever Stack Overflow post, thanks for your time. Any constructive criticism on how to post better, please just let me know. I have done a search on my query and have found similar posts, but I was unable to use the information within them to resolve my problem.
I have created a mysql database using the terminal window in my Ubuntu system (which I am also new to, having been a lifelong windows user). I used the following code in the terminal window:
$ mysql -u root -p
Then once in mysql, I did the following
CREATE DATABASE securities_master;
USE securities_master;
I created a user and tables in the database using some other code, that doesn't seem relevant here, so I won't bother posting. However, I then decided I would like to take a look at the tables in the database, so I downloaded an SQLite browser. It was at this point that I realized I could not find my database file.
I tried to find the answer on previous stack overflow posts, and tried the suggestions of:
locate sqlite
locate .db
locate .sqlite
locate securities_master
But unfortunately, none of these showed the file I was looking for. The only place I can think of would be what is called the 'root' directory in my computer, but the Ubuntu file manager system won't let me view it because it says I don't have permissions. Is this where it might be?
Could someone shed some light on where I might be able to find this file/database? I know it is definitely there because if I try to CREATE it again, I get the message that it can't because it already exists.
Thanks again.
sqlite and mysql are two different databases. You can't use sqlite on a mysql database. sqlite is a single-file database, in which users just open the file and read and write to it, while mysql is a more traditional relational database system with a server and a client, where the server manages the database (which is generally in a directory of files), while the client just connects to the server.
Where the mysql database is located my depend on your system, but it's usually in /var/lib/mysql. You can look in /etc/mysql/my.cnf for the configuration file, which should have a datadir option that refers to where the actual data for the database is stored.
You can check my.ini file to see where the data folder is located.
Usually there is a folder {mysqlDirectory}/data
MySQL data storage:
Commands.frm
Commands.myd
Commands.myi
The *.frm files contain the table definitions. Your *.myi files are MyISAM index files. Your *.myd files contain the table data.
as mentioned in the answer before mine, mysql and sqlite are two different systems.
You mention you used the cmd line mysql to create the database and then wanted to view the tables. If you're simply trying to see which table are created, in the same command line you used to Create the database you can run show tables;
If you're after a GUI for this, we'd need a bit more context. Is this ubuntu system a remote server, or are you using the desktop version?
You say you're a long time windows user, If you're using windows locally, I personally like SQLWorkbench for accessing my remote mysql servers.
EDIT: I just re-read your post and realised you're using local ubuntu desktop so me mentioning remote was silly, my bad! However, SQLWorkbench does have a ubuntu version at https://dev.mysql.com/downloads/workbench/
Recently I setup a website on byethost.com using the CMS ezpublish. After a couple days of working on the site, byethost deleted the Mysql database. I still have all the FTP files but I can't log in as an admin because their is not Mysql database with all the users. Is there any way I can create a new Mysql database setup for Ezpublish. All I need currently is an admin account and whatever other information is essential to have for Ezpublish to run. Any response/ideas would be great.
Just create a new database
Then, for a plain site (not ezflow neither ezwebin) import those files : kernel/sql/mysql/kernel_schema.sql and kernel/sql/common/cleandata.sql in MySQL.
The admin username will be : admin and the admin password will be : publish
By the way, an other solution is to edit settings/override/site.ini.append.php and change this:
[SiteAccessSettings]
CheckValidity=false
to this:
[SiteAccessSettings]
CheckValidity=true
Reloading a page will lead to launch the setup wizard just like if it was a fresh install. (If it doesn't work, you may need to clear the cache by yourself and try again)
I'm trying to migrate a web site to friend's server. The site uses MySQL, but he didn't previously have it set up. He's installed the package now and suggested that I could run my own instance of it. I'm at a loss for how to do so. Is it even possible? If so, how?
Some relevant information:
The OS in use is CentOS 5.9
Using MySQL 5.0.95
I only need the DB to be read locally via PHP when serving my site.
I have no root privileges on this system (although a full shell), but am close friends with the owner/administrator if that's necessary.
To clarify:
It's the daemon that I want to run my own instance of. So I guess what I want to know is if it's possible to have multiple users on the system running their own instances of mysqld containing different databases.
All I need this for is serving a web page. If I have to break down and switch to a pseudo-database using CSV files I will, but I'd much rather stick to MySQL if I can.
If MYSQL is setup on that machine yes you can run your own instance of it.
You can have it set up and your site given its on Database within that MYSQL instance and that specific MYSQL account can be used to access the tables etc. involved with your website.
Now if he is only putting MYSQL on the machine then having you set everything up you will just need an account for MYSQL and from ther eyou can get in and just create all the needed items that will allow your site to fully function.
EDIT
In response to your comment. You can you just can't clog the same port or have configurations that conflict each other. As long as it won't be to much of a performance hit and you configure a different user to start each instance you should be able to do Something like this.
Firstly, my aim is to create a database to store statistical information about my wiki articles, that is derived using extensions that I have written for my MediaWiki server. Then via another extension on my server, I wish to access this secondary database and use the information to edit the output of the final article page.
I wanted to try and make a separate database to avoid introducing errors to the existing MediaWiki schema. Is this possible? I can't find any information about running an additional mySQL database alongside a MediaWiki installation.
I feel as though the better solution may be to add a table to the existing schema, but I'm not sure how to deal with the existing infrastructure without breaking it. I believe I can just use standard CREATE commands but mySQL is unfortunately not my strong point.
Thanks
Hope i understood your problem. say you have media wiki server or a mysql server running on port 3308 and you want to create another mysql instance.
Follow this step:
bkp my.cnf file
start first instance on port 3308
chnage my.cnf settings & make it run on 3307
start second instance of mysql
If you have good h/w,swap/RAM, you can easily create such 4-5 instances & all will be running good.
You can run a separate database along with the primary MediaWiki database. You just have to open a connection to it specifically using the PHP MySQL API.
Adding a new table to the existing database though is really easy and probably your best bet. You will be able to take advantage of the built-in database load balancing if your site ever gets big. To learn how to create a new table from an extension, check out this page of documentation.