This question already has answers here:
How to change MySQL table names in Linux server to be case insensitive?
(6 answers)
Closed 6 years ago.
My my.cnf config file is with:
lower_case_table_names = 2
so if table name is "MyUsers" it will take as it is.
but in view: i have used as a "myusers".
in windows its working.
Now when i am trying to execute it(view) in linux server then it is saying "myusers" doesnt exists.
what is the problem in linux and its corresponding solution.
Not Duplicate: As I clearly mentioned what I need and what I get. This is in view.
MySQL users files for tables and views. The name of the files are identical to those of the tables as created. Windows is case-insensitive as far as addressing files is concerned. Linux is not, meaning that you can have the files myfile.txt and Myfile.txt at the same folder.
There is no way out (I learned this in the past as you are learning it now). You MUST use table/views names with the same case as they are defined. Column names, on the other hand, are case insensitive.
Related
This question already has answers here:
Mysql Copy Database from server to server in single command
(3 answers)
Closed 1 year ago.
So I would like to make a test playground for my website where I don't alter with the original production data, and therefore I want to make a copy of all my data, and put it into another database. But how can I do this the right way?
I have a database with a lot of tables called testreporting4, and I want to make a copy of all the data/structure into the database called testreportingdebug
From testreporting4 to testreportingdebug
My database size is around 3.1GB at the moment (don't know if that changes anything)
I think the easiest way is the export the database and then import it. More information regarding exporting/importing MariaDB: https://www.digitalocean.com/community/tutorials/how-to-import-and-export-databases-in-mysql-or-mariadb
This question already has answers here:
How do I rename a MySQL database (change schema name)?
(46 answers)
Closed 3 years ago.
I created a database with the name of old. Now I need to change database name to new.
But,I did not know how to change a name?
I believe that the ability to rename a database has been removed from the spec for security reasons. What you will need to do is create a full dump of the database "old". Then you'll need to create a new database and re-import the data
This question already has answers here:
MySQL "Row 30153 was cut by GROUP_CONCAT()" error
(2 answers)
Closed 4 years ago.
I came across a poorly designed MySql table by previous developer where I need to group_concat very long strings. Due to my company’s contract I’m not allowed to alter the design (nor change the query). I’m looking for a way to increase the length of the output. I came across a query with which a length can be set but valid for a single session.
Edit 1:
Suggestion provided by Madhur Bhaiya is not persistent, it only holds true for a given session.
To make changes for a specific session, you can use the following:
SET GLOBAL group_concat_max_len=15000;
Also, to make changes global, you can set the same in MySQL config files. Depending on your server configuration, make the changes in specific mysqld config files. Make sure the setting is under the [mysqld] group header
[mysqld]
group_concat_max_len=15000
After making the changes, you can Restart the MySQL server.
This question already has answers here:
Are table names in MySQL case sensitive?
(5 answers)
Closed 6 years ago.
I would like to be able to query the table Users and its columns UserName and Email case insensitively:
select username, email from users;
I know MySQL is case-insensitive for strings by default--that is not my question. I would like to query case-insensitive table and column names.
The SQL Server environment I work allows me to do so but don't know how to do so in MySQL.
You can use the lower_case_table_names system variable as described in Documentation. You can set this variable to the allowed value on start of mysqld or even in my.cnf config file
This question already has answers here:
Migrate database from Postgres to MySQL [closed]
(3 answers)
Closed 8 years ago.
I'm looking to grab a few bits of data from musicbrainz db to use in a mysql based app.
I don't need the entire database, and have been looking at 'migrating' postgreSQL to mysql, which it seems lots of people have difficulty with.
Wouldn't it be simplest to just dump the postgreSQL data into a comma-delimited text file, and then import that into mysql?
I'm just getting started with this, and don't even have postgreSQL installed yet, but trying to look ahead at how I'm going to do it.
You can use COPY (in the psql client) to dump a single table.
Or you can use pg_dump with the -d parameter. This will cause pg_dump to dump INSERT statements, which you can just execute against your MySQL server. You will obviously need to port the schema first - and assuming the datatypes that are used exist in MySQL.
Perhaps you want to dump you Database to a SQL script.