LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-24-2017, 01:37 PM   #1
kurtttlogan
LQ Newbie
 
Registered: Jan 2017
Posts: 4

Rep: Reputation: Disabled
Smile MySQL


I am a student looking her help on my senior design project. I have downloaded MySQL and have made a database, but for some reason it is not allowing me to create a table. I need to insert complex numbers into this table that will be coming from GNU Radio and ultimately from some USRPs. If I could get any help it would be greatly appreciated!
 
Old 01-24-2017, 01:38 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Can we see the output?

Edit: Can we see the output of the command you are running? The errors? The permissions? Any commands you have run against it? We have to see some sort of output to focus in on helping you.

Last edited by szboardstretcher; 01-24-2017 at 01:55 PM.
 
1 members found this post helpful.
Old 01-24-2017, 01:41 PM   #3
kurtttlogan
LQ Newbie
 
Registered: Jan 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Currently I can get the data to be stored into files, but they cannot be viewed. I can utilize the files for the post processing I am doing, but this does not allow me to make my system real time.
 
Old 01-24-2017, 01:44 PM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Which distro are you using and which package manager did you use to get MySQL (or MariaDB) installed?
 
Old 01-24-2017, 01:51 PM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by kurtttlogan View Post
Currently I can get the data to be stored into files, but they cannot be viewed. I can utilize the files for the post processing I am doing, but this does not allow me to make my system real time.
By "Can we see the output?", I think that szboardstretcher means the error output from MySQL when you try to create a table.
 
Old 01-24-2017, 02:03 PM   #6
kurtttlogan
LQ Newbie
 
Registered: Jan 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Trying to type in CREATE TABLE ant1, data ENUM();

Have tried it multiple ways and I keep getting the same error message. Tried to put numbers into the ENUM also.
The error message says "You have an error in your SQL syntax; check the manual that corresponds to your MySQL version server for the right syntax to use near ' data ENUM()' at line 1.

I am using Ubuntu.
 
Old 01-24-2017, 02:05 PM   #7
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Quote:
Originally Posted by kurtttlogan View Post
I am using Ubuntu.
Thanks. Which version and did you use the Software Center or APT or Synaptic to install MySQL?
 
Old 01-24-2017, 02:08 PM   #8
kurtttlogan
LQ Newbie
 
Registered: Jan 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Thanks. Which version and did you use the Software Center or APT or Synaptic to install MySQL?
I used APT
 
Old 01-24-2017, 02:14 PM   #9
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Ok. Thanks. Just checking the background. It would help to know the version of Ubuntu and of MySQL. There are small details that vary from version to version. Every once in a while there are big changes.

As far as creating the tables, the syntax is quite different. Here is a short sample excerpted from a very old MySQL database:

Code:
CREATE TABLE `ISO3166` (
  `code2` char(2) NOT NULL default '',
  `country` char(30) NOT NULL default '',
  UNIQUE KEY `code2` (`code2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
The current syntax is here:

https://dev.mysql.com/doc/refman/5.7...ate-table.html

Be sure to look up the reference that matches the version of MySQL you are using.
 
Old 01-24-2017, 02:14 PM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by kurtttlogan View Post
Trying to type in CREATE TABLE ant1, data ENUM();

Have tried it multiple ways and I keep getting the same error message. Tried to put numbers into the ENUM also.
The error message says "You have an error in your SQL syntax; check the manual that corresponds to your MySQL version server for the right syntax to use near ' data ENUM()' at line 1.

I am using Ubuntu.
You may want to look at this: https://dev.mysql.com/doc/refman/5.7...ate-table.html

In English, which columns within the table are you trying to set up?

Last edited by hydrurga; 01-24-2017 at 02:15 PM. Reason: :) Beat me to it...
 
Old 01-24-2017, 02:17 PM   #11
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
If you have a requirement to use ENUM,. here are some examples:

Code:
CREATE TABLE ant1 (data ENUM(''));
CREATE TABLE ant2 (bands ENUM('zep', 'floyd', 'slayer'));

describe ant1;
+-------+----------+------+-----+---------+-------+
| Field | Type     | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| data  | enum('') | YES  |     | NULL    |       |
+-------+----------+------+-----+---------+-------+

describe ant2;
+-------+------------------------------+------+-----+---------+-------+
| Field | Type                         | Null | Key | Default | Extra |
+-------+------------------------------+------+-----+---------+-------+
| bands | enum('zep','floyd','slayer') | YES  |     | NULL    |       |
+-------+------------------------------+------+-----+---------+-------+
This is available at the documentation: https://dev.mysql.com/doc/refman/5.7/en/enum.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can MySQL log on via SSH/bash? mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash Ujjain Linux - Newbie 2 04-24-2009 02:21 PM
yum install php-mysql fails with mysql 5.1 - "Error: mysql conflicts with MySQL" rebelde Linux - Software 2 03-13-2009 10:32 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration