Programming and computer science basics [closed] - mysql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Today, to make MySQL work on my Ubuntu i found some piece of code that i had to type in the terminal to install MySQL server. Then i had to insert some code like:
mysql -u root -p /*enter*/
then insert my password and enter again.
At this point i created a new database with the code
mysql> create database MyFirstDatabase; /*enter*/
Fact is that i have no idea of what i did and why. Why did i have to install MySQL server and why my workbench wasn't working before? Why my username was root?
Where the database file was created, in which folder?
I want to be able to know the answer to questions like:"what happen in the machine when i declare a variable?" or "What happen if i declare an array with a certain number of elements but with no content in them?" and also "what happens in the pc when i run a SQL query with an inner join?".
ADDITIONS
I had also no idea why one of the IT technician of the university asked me if i had an apache server. Why did he ask this? I admit i have no idea of client/server from a technical perspective

By inserting the first command in the terminal you're accessing the MySQL cli interface which commands the MySQL server. The second command (with prompt mysql>) is a query itself made directly in the cli and submitted at your enter.
For what MySQL is used for... well you should already know, as "Oracle", it is a relational database and it is used to store data in a relational way.
Root is the username with ALL privileges, in every field, the root user is the one who have all the power in his hand. Database files are usually stored in /var/lib/mysql if I remember correctly (on Ubuntu).
For the other questions I can't really answer you since it would require much time and starting from scratch.
Beware: Asking for suggestions or recommendations in this site is a good way to get your question closed.

Related

Is it OK to copy DB files from one MySQL server to another? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have two identically configured MySQL 5.6.10 servers and needed to move the data files fast from one to the other. Is this an OK procedure?
Here is what I did:
1) Shut down both servers
2) Moved all the files from one box to the other (DATA is on a separate drive on both machines)
3) Turned the second server on
4) Connected it back to the app server
It took about 5 minutes to move all files (~50GB) and all seems to work. I just wonder if I missed anything?
Thanks much for your feedback.
If both the server versions are same, then I think, it's perfectly fine, not just OK, as I have done the same many times, without any data loss, but this method comes with cost:
You have to shut down mysql server (which is not good, if it's a production server)
You have to make sure the permission of data (mysql) directory is same as the previous one.
You will have to monitor the mysql_error log while starting the second server.
You can use mysqldump, but if you don't want to, then you can use Mysql Workbench's migration wizard, it really takes care of everything.
A much safer and recommended way would be Database Backup And Recovery.
Do a full backup from server1 and restore it to server2. Later then on, you can go for a differential backup.

installing mysql server on a network [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I want to install MySQL server at work. The goal is to give Remote Access to different users. This part is OK. I have granted permission to others users and it worked.
My question is how and where can i install MySQL server so it is not depended on my work computer being on. At my Works network we have common Networks harddisk. If i install MySQL server there, is it gonna be running all the time? or do i need to contact IT in order to install MySQL on the server hosting Our main work database?
thanks for helping.
There are a lot of considerations to be made when installing new servers. If you are going to be running an SQL Server your I.T. Department should know about it. They are also going to be the best people to determine potential security concerns and where it would be most suitably hosted.
When you say you have "common Networks harddisk" I presume you mean a mapped network drive or SMB Shares. This is for data storage and you cannot install anything to there without direct access to the server they are running on.
It is also likely that your company is already running a dedicated SQL Server which you may be able to utilize.
Either way if you have an IT Department, They need to know and they are the only people who can answer this question.

Error "The passwords provided for the Sugar database user do not match. Please re-enter the same passwords in the password fields" [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
When tried to install the sugarcrm with mysql database.
It is showing an error
The passwords provided for the Sugar database user do not match.
Please re-enter the same passwords in the password fields
But the entered passwords for both fields: "Password" and "Re-enter password" are same.
I have tried it many times but the error still persist. So please help to connect sugarcrm with mysql.
I assume you are asking about how to have the Sugar installer create a new DB user for you, and are getting this error.
This is a known bug, and yet Sugar has not fixed it.
You can patch the file responsible yourself, OR you can use a known db user (i.e. root or other) and change the user later (in the config.php file), OR create a new user in the db first, then use that (rather than having Sugar create the user).
per http://forums.sugarcrm.com/f115/new-installation-cant-use-option-define-user-create-database-screen-78786/#post281399, there is an extra hidden INPUT in install/dbConfig_a.php that you should remove if you wish to patch the file yourself.
In version 6.5.15, this is line 198.
Based on the forum post linked above, this issue has persisted since 6.4.5 or earlier.

Two questions about backing up your website (mysql and files) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
So the only method i like using and think is the simplest to use is mysqldump to backup mysql databases. Right now, im using phpmyadmin to backup the tables. Is there any way i can code a script that does it automatically (preferably everyday).
And how do i back up files exactly on my server. I have an images file that i need to back up. I'm not sure exactly how to go about backing those up.
Of course -- use MySQL Dumper. You can automatically backup your databases to another host if you like!
Features
Send dumpfiles via FTP to up to 3 different server. This is also working using the multipart feature.
Automatic file-deletion: set your own rules to delete old backups. Specify the number of backups you want to hold and let MySQLDumper automatically delete the older ones to save server webspace.
MySQLDumper can do Multipart-Backups. That means: it can automatically split the dumpfile if it gets bigger than your chosen size. When you want to restore a backup and choose the wrong part - it doesn' matter: MySQLDumper will notice that and will get the correct startfile automatically.
Security: MySQLDumper can generate a .htaccess-file to protect itself and all of your backup-files
Good reading resource for alternatives
10 Ways to Automatically & Manually Backup MySQL Database
Since Gary answered your first question, I'll answer your second.
For backing up the server:
I'm assuming you are talking about your web applications and the images contained in folders used by those applications. Source control will work for this. Set up a Subversion server or something like it.
http://subversion.tigris.org/
Hope this helps. Good luck.

Automatically Monitor MySQL servers for crashed tables [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there some ready off the shelf solution that would periodically connect to MySQL server, check for crashed tables and automatically initiate repair and/or send administrator an email?
MySQL has come up with a MySQL Enterprise Monitor web applciation tool that helps you to monitor the MySQL Servers. It can also be used to send an alert the administrators of errors.
I resorted to writing a simple Scheduled task that runs myisamchk periodically
It is not ready off the shelf, but very easy solution - every table crash is written to MySQL error log (usually .err in data directory. You can create very simple script that is awaken every X minutes and checks this log file (using tail -XXX command for example) for entries with 'marked as crashed'. Then it can alert in any way.
Is it crash a lot? if it is crashing a lot , I think you have to find the reason for why it is crashing. May be there is a hardware problem or another problems.