The title is rewritten as: Successfully solved - the problem of unable to update mySQL column names using the mysql command line
<p>I cannot change the column names in the mysql database I created. </p>
<p>I tried the following commands but none of them seem to work. </p>
<pre class="brush:php;toolbar:false;">alter table (mytablename) CHANGE COLUMN (oldcolumnname) (newcolumnname) varchar(120);</pre>
<pre class="brush:php;toolbar:false;">alter table (mytablename) RENAME COLUMN (oldcolumnname) (newcolumnname) varchar(120);</pre>
<pre class="brush:php;toolbar:false;">ALTER TABLE (mytablename) CHANGE (oldcolumnname) (newcolumnname) varchar(120);</pre>
<p>Where (mytablename) is the name of the table I created, (oldcolumnname) is the original column name, and (newcolumnname) is the new column name. </p>
<p>Here is a simple to-do list I created for learning MySQL with the following items: </p>
<table class="s-table">
<thead>
<tr>
<th>id</th>
<th>todo</th>
<th>completed</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Ready to take off</td>
<td>is</td>
</tr>
<tr>
<td>2</td>
<td>Learn some MySQL</td>
<td>is</td>
</tr>
<tr>
<td>3</td>
<td>Remember that damn semicolon</td>
<td>No</td>
</tr>
</tbody>
</table>
<p>In this case I tried changing the column 'todo' to 'To Do' or 'To-Do' but every time I try these commands I get the famous "Check your SQL version manual" ". </p>
<p>Any tips on what I might be doing wrong? Thanks! </p>
<p>I've looked at multiple tutorial sites and even looked at another StackOverflow question</p>
<p><strong>Update</strong> The final solution was a two-step process. First, I need to use the <strong>TO</strong> phrase between the column names. Secondly, column names don't like special characters. </p>
<p>The query that finally worked was: </p>
<pre class="brush:php;toolbar:false;">ALTER TABLE mytablename CHANGE COLUMN todo TO ToDo</pre>
<p><br /></p>